diff options
| author | Maxime Dénès | 2017-04-07 12:56:40 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2017-04-12 15:10:15 +0200 |
| commit | a74d64efb554e9fd57b8ec97fca7677033cc4fc4 (patch) | |
| tree | 361960411112f34147d058dc78c4716bef05b0f9 /parsing/g_constr.ml4 | |
| parent | f41944730792070d4a3074aa1fe1f8465062b758 (diff) | |
| parent | 01622922a3a68cc4a0597bb08e0f7ba5966a7144 (diff) | |
Merge PR#422: Supporting all kinds of binders, including 'pat, in syntax of record fields.
Diffstat (limited to 'parsing/g_constr.ml4')
| -rw-r--r-- | parsing/g_constr.ml4 | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/parsing/g_constr.ml4 b/parsing/g_constr.ml4 index 05cb74ddca..0f2ed88fea 100644 --- a/parsing/g_constr.ml4 +++ b/parsing/g_constr.ml4 @@ -43,9 +43,6 @@ let binder_of_name expl (loc,na) = let binders_of_names l = List.map (binder_of_name Explicit) l -let binders_of_lidents l = - List.map (fun (loc, id) -> binder_of_name Explicit (loc, Name id)) l - let mk_fixb (id,bl,ann,body,(loc,tyc)) = let ty = match tyc with Some ty -> ty @@ -222,15 +219,14 @@ GEXTEND Gram record_fields: [ [ f = record_field_declaration; ";"; fs = record_fields -> f :: fs - | f = record_field_declaration; ";" -> [f] | f = record_field_declaration -> [f] | -> [] ] ] ; record_field_declaration: - [ [ id = global; params = LIST0 identref; ":="; c = lconstr -> - (id, abstract_constr_expr c (binders_of_lidents params)) ] ] + [ [ id = global; bl = binders; ":="; c = lconstr -> + (id, mkCLambdaN (!@loc) bl c) ] ] ; binder_constr: [ [ "forall"; bl = open_binders; ","; c = operconstr LEVEL "200" -> |
