-
Notifications
You must be signed in to change notification settings - Fork 206
Closed
Description
ocaml/ocaml#12236 has been merged in ocaml and contains changes to the parsetree.
The changes are helping the work on the CST (#2213).
This requires some more changes: (thanks @ncik-roberts for the heads up)
fun x -> fun y ->must no longer be rewritten tofun x y ->, as the two have different semantics.fun x -> function y -> x + yis also different fromfun x -> (function y -> x + y). so parens around function are now meaningful.
@ncik-roberts adds:
In the case where the programmer writes fun x -> fun y -> x + y, it might be nice to visually exaggerate the fact that the inner function is separate now, with something like fun x -> (fun y -> x + y). (Now that this PR is merged, fun x -> fun y -> x + y has different runtime characteristics than fun x y -> x + y, where the former is an arity-1 function returning an arity-1 function, and the latter is an arity-2 function.)
Metadata
Metadata
Assignees
Labels
No labels