Skip to content

Commit 2c0b97f

Browse files
committed
cleanup
1 parent 987b5ca commit 2c0b97f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jscomp/frontend/ast_exp_handle_external.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ let handle_ffi ~loc ~payload =
110110
with
111111
| None -> err ()
112112
| Some exp ->
113-
let wrap (e : Parsetree.expression) =
113+
(* Wrap a type constraing base on arity.
114+
E.g. for arity 2 constrain to type (_, _) => _ *)
115+
let wrapTypeConstraint (e : Parsetree.expression) =
114116
let loc = e.pexp_loc in
115117
let any = Ast_helper.Typ.any ~loc:e.pexp_loc () in
116118
let unit = Ast_literal.type_unit ~loc () in
@@ -129,7 +131,7 @@ let handle_ffi ~loc ~payload =
129131
Ast_helper.Exp.constraint_ ~loc e type_
130132
| _ -> err ()
131133
in
132-
wrap
134+
wrapTypeConstraint
133135
{
134136
exp with
135137
pexp_desc =

0 commit comments

Comments
 (0)