Commit 1c011548 authored by MARCHE Claude's avatar MARCHE Claude Committed by Guillaume Melquiond

Bugfix 20618: need for parenthesis around (fun x -> ) in ocaml extraction

parent 7bea7fc5
module Bug
use HighOrd
type foo = { a: unit -> unit ; b : unit }
constant bar : foo = {
a = \_. () ;
b = ()
}
end
......@@ -950,7 +950,7 @@ module Print = struct
fprintf fmt (protect_on paren "@[<hov 2>%a@ %a@]")
(print_expr info) e (print_list space (print_expr_p info)) el
| Efun (vl, e1) ->
fprintf fmt (protect_on paren "@[<hov 2>fun %a ->@ %a@]")
fprintf fmt (protect_on paren "@[<hov 2>(fun %a ->@ %a)@]")
(print_list space (print_vs_arg info)) vl (print_expr info) e1;
forget_vars vl
| Econstr (c, []) ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment