aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/pretyping.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2014-07-01 22:50:37 +0200
committerGravatar Matthieu Sozeau <matthieu.sozeau@inria.fr>2014-07-01 22:52:08 +0200
commit4c97e4ce19ca4c387039cfdcb4f24658100230b0 (patch)
tree8e6367b1936d842b3e56283abc25de2342452884 /pretyping/pretyping.ml
parent3d2582eeb492fb21b7136016bf4c1a0463dc15c2 (diff)
Add toplevel commands to declare global universes and constraints.
Diffstat (limited to 'pretyping/pretyping.ml')
-rw-r--r--pretyping/pretyping.ml13
1 files changed, 9 insertions, 4 deletions
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml
index c8c1d0e21..9609a959b 100644
--- a/pretyping/pretyping.ml
+++ b/pretyping/pretyping.ml
@@ -96,10 +96,15 @@ let ((constr_in : constr -> Dyn.t),
let interp_universe_name evd = function
| None -> new_univ_level_variable univ_rigid evd
| Some s ->
- try let level = Evd.universe_of_name evd s in
- evd, level
- with Not_found ->
- new_univ_level_variable ~name:s univ_rigid evd
+ try
+ let id = try Id.of_string s with _ -> raise Not_found in
+ let names, _ = Universes.global_universe_names () in
+ evd, Idmap.find id names
+ with Not_found ->
+ try let level = Evd.universe_of_name evd s in
+ evd, level
+ with Not_found ->
+ new_univ_level_variable ~name:s univ_rigid evd
let interp_sort evd = function
| GProp -> evd, Prop Null