Skip to content

Commit dfb4b2e

Browse files
committed
More explicit translation for Function$.
Cosmetic change that will be needed later to remove `Function$`.
1 parent c1c8e11 commit dfb4b2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/ml/translcore.ml

+3-1
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,9 @@ and transl_exp0 (e : Typedtree.expression) : Lambda.lambda =
823823
with Not_constant -> Lprim (Pmakeblock Blk_tuple, ll, e.exp_loc))
824824
| Texp_construct ({txt = Lident "false"}, _, []) -> Lconst Const_false
825825
| Texp_construct ({txt = Lident "true"}, _, []) -> Lconst Const_true
826-
| Texp_construct ({txt = Lident "Function$"}, _, [expr]) ->
826+
| Texp_construct
827+
({txt = Lident "Function$"}, _, [({exp_desc = Texp_function _} as expr)])
828+
->
827829
(* ReScript uncurried encoding *)
828830
let loc = expr.exp_loc in
829831
let lambda = transl_exp expr in

0 commit comments

Comments
 (0)