aboutsummaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorGaetan Gilbert2017-04-06 22:48:32 +0200
committerGaetan Gilbert2017-05-03 13:37:56 +0200
commite9b745af47ba3386724b874e3fd74b6dad33b015 (patch)
tree2d6953e463d5d0dad13a29e4340b16671681a731 /library
parent4bff930da2c029a66eaf5378e5abd2cc35554f8f (diff)
Allow flexible anonymous universes in instances and sorts.
The addition to the test suite showcases the usage.
Diffstat (limited to 'library')
-rw-r--r--library/declare.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/declare.ml b/library/declare.ml
index 31c9c24bc3..91e0cb44b3 100644
--- a/library/declare.ml
+++ b/library/declare.ml
@@ -514,11 +514,10 @@ let do_constraint poly l =
match x with
| GProp -> Loc.dummy_loc, (false, Univ.Level.prop)
| GSet -> Loc.dummy_loc, (false, Univ.Level.set)
- | GType None ->
+ | GType None | GType (Some (_, Anonymous)) ->
user_err ~hdr:"Constraint"
(str "Cannot declare constraints on anonymous universes")
- | GType (Some (loc, id)) ->
- let id = Id.of_string id in
+ | GType (Some (loc, Name id)) ->
let names, _ = Global.global_universe_names () in
try loc, Idmap.find id names
with Not_found ->