Lines 23-35
value expr_of_patt p =
Link Here
|
23 |
| _ -> Stdpp.raise_with_loc loc (Stream.Error "identifier expected") ] |
23 |
| _ -> Stdpp.raise_with_loc loc (Stream.Error "identifier expected") ] |
24 |
; |
24 |
; |
25 |
|
25 |
|
|
|
26 |
value fst3 (a,b,c) = a ; |
27 |
|
26 |
EXTEND |
28 |
EXTEND |
27 |
str_item: |
29 |
str_item: |
28 |
[ [ "local"; rf = [ "rec" -> True | -> False ]; |
30 |
[ [ "local"; rf = [ "rec" -> True | -> False ]; |
29 |
lb = LIST1 let_binding SEP "and"; "in"; "value"; |
31 |
lb = LIST1 let_binding SEP "and"; "in"; "value"; |
30 |
rf1 = [ "rec" -> True | -> False ]; |
32 |
rf1 = [ "rec" -> True | -> False ]; |
31 |
lb1 = LIST1 let_binding SEP "and" -> |
33 |
lb1 = LIST1 let_binding SEP "and" -> |
32 |
let pl = List.map fst lb1 in |
34 |
let pl = List.map fst3 lb1 in |
33 |
let el = List.map expr_of_patt pl in |
35 |
let el = List.map expr_of_patt pl in |
34 |
<:str_item< |
36 |
<:str_item< |
35 |
value ($list:pl$) = |
37 |
value ($list:pl$) = |