forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ocaml405.patch
41 lines (37 loc) · 1.75 KB
/
ocaml405.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Index: js_of_ocaml-2.8.4/lib/ppx/ppx_js.ml
===================================================================
--- js_of_ocaml-2.8.4.orig/lib/ppx/ppx_js.ml
+++ js_of_ocaml-2.8.4/lib/ppx/ppx_js.ml
@@ -162,7 +162,8 @@ let invoker ?(extra_types = []) uplift d
{[ fun (type res t0 t1 ..) arg1 arg2 -> e ]}
*)
let local_types =
- res :: List.map Arg.name (extra_types @ arguments)
+ List.map Location.mknoloc
+ (res :: List.map Arg.name (extra_types @ arguments))
in
let result = List.fold_right Exp.newtype local_types invoker in
@@ -210,7 +211,7 @@ let method_call ~loc obj meth args =
(Exp.fun_ ~loc ~attrs:[merlin_noloc] Label.nolabel None
(Pat.var ~loc ~attrs:[merlin_noloc] (Location.mknoloc "x"))
(Exp.send ~loc ~attrs:[merlin_noloc]
- (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) meth))]
+ (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) (Location.mknoloc meth)))]
)
(* {[ obj##.prop ]} generates
@@ -244,7 +245,7 @@ let prop_get ~loc:_ ~prop_loc obj prop =
(Exp.fun_ ~loc:gloc Label.nolabel None
(Pat.var ~loc:gloc ~attrs:[merlin_noloc] (Location.mknoloc "x"))
(Exp.send ~loc:prop_loc ~attrs:[merlin_noloc]
- (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) prop))
+ (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) (Location.mknoloc prop)))
]
)
@@ -289,7 +290,7 @@ let prop_set ~loc ~prop_loc obj prop val
(Exp.fun_ ~loc Label.nolabel None
(Pat.var ~loc:gloc ~attrs:[merlin_noloc] (Location.mknoloc "x"))
(Exp.send ~loc:prop_loc ~attrs:[merlin_noloc]
- (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) prop))
+ (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) (Location.mknoloc prop)))
]
)