aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2016-12-02 16:46:05 +0100
committerGravatar Matthieu Sozeau <mattam@mattam.org>2016-12-02 16:47:49 +0100
commitf492ddb3f9949993ad9072688e9e2cac7cfcbce0 (patch)
tree3352ca1cb1650f4d4268eea64c030e3aa8be0ec9 /toplevel
parentaf58f731322527af1d81233beade4c98fbb2d7bd (diff)
Comment on universe handling in Parameters
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/command.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/toplevel/command.ml b/toplevel/command.ml
index f6172a4b8..8b527ebd6 100644
--- a/toplevel/command.ml
+++ b/toplevel/command.ml
@@ -286,6 +286,7 @@ let do_assumptions_unbound_univs (_, poly, _ as kind) nl l =
l []
else l
in
+ (* We intepret all declarations in the same evar_map, i.e. as a telescope. *)
let _,l = List.fold_map (fun (env,ienv) (is_coe,(idl,c)) ->
let t,imps = interp_assumption evdref env ienv [] c in
let env =
@@ -297,6 +298,7 @@ let do_assumptions_unbound_univs (_, poly, _ as kind) nl l =
(env,empty_internalization_env) l
in
let evd = solve_remaining_evars all_and_fail_flags env !evdref (Evd.empty,!evdref) in
+ (* The universe constraints come from the whole telescope. *)
let evd = Evd.nf_constraints evd in
let ctx = Evd.universe_context_set evd in
let l = List.map (on_pi2 (nf_evar evd)) l in
@@ -307,7 +309,9 @@ let do_assumptions_unbound_univs (_, poly, _ as kind) nl l =
(fun (_,id) (c,u) -> (id,Universes.constr_of_global_univ (c,u)))
idl refs
in
- (subst'@subst, status' && status, Univ.ContextSet.empty)) ([],true,ctx) l)
+ (subst'@subst, status' && status,
+ (* The universe constraints are declared with the first declaration only. *)
+ Univ.ContextSet.empty)) ([],true,ctx) l)
let do_assumptions_bound_univs coe kind nl id pl c =
let env = Global.env () in