You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
2 years ago
|
diff --git a/ext/pa_def.ml b/ext/pa_def.ml
|
||
|
index 812240d..871bfe2 100644
|
||
|
--- a/ext/pa_def.ml
|
||
|
+++ b/ext/pa_def.ml
|
||
|
@@ -33,7 +33,7 @@ value subst mloc env =
|
||
|
loop where rec loop =
|
||
|
fun
|
||
|
[ <:expr< let $opt:rf$ $list:pel$ in $e$ >> ->
|
||
|
- let pel = List.map (fun (p, e) -> (p, loop e)) pel in
|
||
|
+ let pel = List.map (fun (p, e, al) -> (p, loop e, al)) pel in
|
||
|
<:expr< let $opt:rf$ $list:pel$ in $loop e$ >>
|
||
|
| <:expr< if $e1$ then $e2$ else $e3$ >> ->
|
||
|
<:expr< if $loop e1$ then $loop e2$ else $loop e3$ >>
|
||
|
diff --git a/ext/pa_local.ml b/ext/pa_local.ml
|
||
|
index b65704d..3ef9cd1 100644
|
||
|
--- a/ext/pa_local.ml
|
||
|
+++ b/ext/pa_local.ml
|
||
|
@@ -23,13 +23,15 @@ value expr_of_patt p =
|
||
|
| _ -> Stdpp.raise_with_loc loc (Stream.Error "identifier expected") ]
|
||
|
;
|
||
|
|
||
|
+value fst3 (a,b,c) = a ;
|
||
|
+
|
||
|
EXTEND
|
||
|
str_item:
|
||
|
[ [ "local"; rf = [ "rec" -> True | -> False ];
|
||
|
lb = LIST1 let_binding SEP "and"; "in"; "value";
|
||
|
rf1 = [ "rec" -> True | -> False ];
|
||
|
lb1 = LIST1 let_binding SEP "and" ->
|
||
|
- let pl = List.map fst lb1 in
|
||
|
+ let pl = List.map fst3 lb1 in
|
||
|
let el = List.map expr_of_patt pl in
|
||
|
<:str_item<
|
||
|
value ($list:pl$) =
|