Skip to content

Commit 3e733c7

Browse files
committed
Ast_convenience.app: pass through callee if no arguments.
Fixes #10.
1 parent 1544249 commit 3e733c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ast_convenience.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ let record ?over l =
2727
Exp.record (List.map (fun (s, e) -> (lid s, e)) l) over
2828
let func l = Exp.function_ (List.map (fun (p, e) -> Exp.case p e) l)
2929
let lam ?(label = "") ?default pat exp = Exp.fun_ label default pat exp
30-
let app f l = Exp.apply f (List.map (fun a -> "", a) l)
30+
let app f l = if l = [] then f else Exp.apply f (List.map (fun a -> "", a) l)
3131
let evar s = Exp.ident (lid s)
3232
let let_in ?(recursive = false) b body =
3333
Exp.let_ (if recursive then Recursive else Nonrecursive) b body

0 commit comments

Comments
 (0)