method seq =
fun f e ->
let rec self right f e =
let go_right = self right
and go_left = self false
in
match e with
| Ast.ExLet (_, r, bi, e1) ->
if right
then
pp f "@[<2>let %a%a@];@ %a" o#rec_flag r
o#binding bi go_right e1
else pp f "(%a)" o#expr e
| Ast.ExSeq (_, e) -> go_right f e
| Ast.ExSem (_, e1, e2) ->
(pp f "%a;@ " go_left e1;
(match (right, e2) with
| (true, Ast.ExLet (_, r, bi, e3)) ->
pp f "@[<2>let %a%a@];@ %a" o#rec_flag r
o#binding bi go_right e3
| _ -> go_right f e2))
| e -> o#expr f e
in self true f e