let compile ~statement_separator ?(no_trap = false) e =
match no_trap with
| false ->
with_trap ~statement_separator ~exit_with:77
(fun ~die -> to_shell {statement_separator; die_command = Some die} e)
| true ->
to_shell {statement_separator; die_command = None} e