aboutsummaryrefslogtreecommitdiff
path: root/parsing/g_constr.ml4
diff options
context:
space:
mode:
authorGaëtan Gilbert2017-09-08 14:58:28 +0200
committerGaëtan Gilbert2017-09-08 18:42:37 +0200
commitb71e68fb78ccde52f1aaa63ef26f0135b92e9be5 (patch)
treefd07ca12f3aa602a082cc960a82f031ea72fa7c3 /parsing/g_constr.ml4
parentb1fbec7e3945fe2965f4ba9f80c8c31b821dbce1 (diff)
Parse directly to Sorts.family when appropriate.
When we used to parse to a glob_sort but always give an empty list in the GType case we can now parse directly to Sorts.family.
Diffstat (limited to 'parsing/g_constr.ml4')
-rw-r--r--parsing/g_constr.ml410
1 files changed, 8 insertions, 2 deletions
diff --git a/parsing/g_constr.ml4 b/parsing/g_constr.ml4
index f637e9746c..7d0728458b 100644
--- a/parsing/g_constr.ml4
+++ b/parsing/g_constr.ml4
@@ -123,8 +123,8 @@ let name_colon =
let aliasvar = function { CAst.loc = loc; CAst.v = CPatAlias (_, id) } -> Some (loc,Name id) | _ -> None
GEXTEND Gram
- GLOBAL: binder_constr lconstr constr operconstr universe_level sort global
- constr_pattern lconstr_pattern Constr.ident
+ GLOBAL: binder_constr lconstr constr operconstr universe_level sort sort_family
+ global constr_pattern lconstr_pattern Constr.ident
closed_binder open_binders binder binders binders_fixannot
record_declaration typeclass_constraint pattern appl_arg;
Constr.ident:
@@ -149,6 +149,12 @@ GEXTEND Gram
| "Type"; "@{"; u = universe; "}" -> GType u
] ]
;
+ sort_family:
+ [ [ "Set" -> Sorts.InSet
+ | "Prop" -> Sorts.InProp
+ | "Type" -> Sorts.InType
+ ] ]
+ ;
universe:
[ [ IDENT "max"; "("; ids = LIST1 name SEP ","; ")" -> ids
| id = name -> [id]