Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jscomp/ml/ast_uncurried.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let rec attributes_to_arity (attrs : Parsetree.attributes) =
let uncurriedFun ~loc ~arity funExpr =
Ast_helper.Exp.construct ~loc
~attrs:(arity_to_attributes arity)
{ txt = Lident "Function$"; loc }
(Location.mknoloc (Longident.Lident "Function$"))
(Some funExpr)

let exprIsUncurriedFun (expr : Parsetree.expression) =
Expand Down
9 changes: 8 additions & 1 deletion res_syntax/tests/printer/expr/Uncurried.res
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ let add3 = (x,y,z) => x+y+z

let triangle = 3 |> add3(1,2) |> add3(4,5)

let () = 3 |> ignore
let () = 3 |> ignore

let foo = (/* ddd */ x) => x

let f = (
// comment
~a,
) => a
7 changes: 7 additions & 0 deletions res_syntax/tests/printer/expr/expected/Uncurried.res.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ let add3 = (x, y, z) => x + y + z
let triangle = add3(4, 5, add3(1, 2, 3))

let () = ignore(3)

let foo = /* ddd */ x => x

let f = (
// comment
~a,
) => a