| 49 |
| "fun"; f = OPT LIDENT; "("; a = LIST1 arrow SEP ";"; ")"; |
| "fun"; f = OPT LIDENT; "("; a = LIST1 arrow SEP ";"; ")"; |
| 50 |
b = branches -> |
b = branches -> |
| 51 |
mk loc (Abstraction { fun_name = f; fun_iface = a; fun_body = b }) |
mk loc (Abstraction { fun_name = f; fun_iface = a; fun_body = b }) |
| 52 |
|
| "fun"; f = OPT LIDENT; |
| 53 |
|
"("; arg = LIDENT; ":"; targ = pat; ")"; ":"; tres = pat ; |
| 54 |
|
"="; body = expr -> |
| 55 |
|
let fun_body = (mk noloc (Capture arg), body) in |
| 56 |
|
mk loc (Abstraction { fun_name = f; fun_iface = [(targ,tres)]; |
| 57 |
|
fun_body = [fun_body] }) |
| 58 |
| (p,e1) = let_binding; "in"; e2 = expr LEVEL "top"-> |
| (p,e1) = let_binding; "in"; e2 = expr LEVEL "top"-> |
| 59 |
mk loc (Match (e1,[p,e2])) |
mk loc (Match (e1,[p,e2])) |
| 60 |
] |
] |