diff options
| author | Matthieu Sozeau | 2014-07-01 22:50:37 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2014-07-01 22:52:08 +0200 |
| commit | 4c97e4ce19ca4c387039cfdcb4f24658100230b0 (patch) | |
| tree | 8e6367b1936d842b3e56283abc25de2342452884 /pretyping/pretyping.ml | |
| parent | 3d2582eeb492fb21b7136016bf4c1a0463dc15c2 (diff) | |
Add toplevel commands to declare global universes and constraints.
Diffstat (limited to 'pretyping/pretyping.ml')
| -rw-r--r-- | pretyping/pretyping.ml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml index c8c1d0e213..9609a959b6 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 |
