aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaëtan Gilbert2018-08-22 16:40:16 +0200
committerGaëtan Gilbert2018-08-28 12:50:05 +0200
commit3aa3c4590ce7d32657cd48ea021254e4215e2889 (patch)
tree20277ef9a5de475c8eb2f48e55a62b7feebeef77
parenta7b09ef087d82e0b733356e6f22dd5a79b967788 (diff)
Close #8091: print universe context for Eval when option on.
-rw-r--r--test-suite/output/UnivBinders.out15
-rw-r--r--test-suite/output/UnivBinders.v2
-rw-r--r--vernac/vernacentries.ml7
3 files changed, 15 insertions, 9 deletions
diff --git a/test-suite/output/UnivBinders.out b/test-suite/output/UnivBinders.out
index 66b2a12c60..926114a1e1 100644
--- a/test-suite/output/UnivBinders.out
+++ b/test-suite/output/UnivBinders.out
@@ -51,6 +51,9 @@ foo is universe polymorphic
Type@{i} -> Type@{j}
: Type@{max(i+1,j+1)}
(* {j i} |= *)
+ = Type@{i} -> Type@{j}
+ : Type@{max(i+1,j+1)}
+(* {j i} |= *)
Monomorphic mono = Type@{mono.u}
: Type@{mono.u+1}
(* {mono.u} |= *)
@@ -152,24 +155,24 @@ inmod@{u} -> Type@{v}
(* u v |= *)
Applied.infunct is universe polymorphic
-axfoo@{i Top.46 Top.47} : Type@{Top.46} -> Type@{i}
-(* i Top.46 Top.47 |= *)
+axfoo@{i Top.48 Top.49} : Type@{Top.48} -> Type@{i}
+(* i Top.48 Top.49 |= *)
axfoo is universe polymorphic
Argument scope is [type_scope]
Expands to: Constant Top.axfoo
-axbar@{i Top.46 Top.47} : Type@{Top.47} -> Type@{i}
-(* i Top.46 Top.47 |= *)
+axbar@{i Top.48 Top.49} : Type@{Top.49} -> Type@{i}
+(* i Top.48 Top.49 |= *)
axbar is universe polymorphic
Argument scope is [type_scope]
Expands to: Constant Top.axbar
-axfoo' : Type@{Top.49} -> Type@{axbar'.i}
+axfoo' : Type@{Top.51} -> Type@{axbar'.i}
axfoo' is not universe polymorphic
Argument scope is [type_scope]
Expands to: Constant Top.axfoo'
-axbar' : Type@{Top.49} -> Type@{axbar'.i}
+axbar' : Type@{Top.51} -> Type@{axbar'.i}
axbar' is not universe polymorphic
Argument scope is [type_scope]
diff --git a/test-suite/output/UnivBinders.v b/test-suite/output/UnivBinders.v
index c6a6b8231f..f806a9f4f7 100644
--- a/test-suite/output/UnivBinders.v
+++ b/test-suite/output/UnivBinders.v
@@ -33,6 +33,8 @@ Print foo.
Check Type@{i} -> Type@{j}.
+Eval cbv in Type@{i} -> Type@{j}.
+
Set Strict Universe Declaration.
(* Binders even work with monomorphic definitions! *)
diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml
index e1228e9d78..41586eed8b 100644
--- a/vernac/vernacentries.ml
+++ b/vernac/vernacentries.ml
@@ -1706,14 +1706,13 @@ let vernac_check_may_eval ~atts redexp glopt rc =
(* OK to call kernel which does not support evars *)
Termops.on_judgment EConstr.of_constr (Arguments_renaming.rename_typing env c)
in
- match redexp with
+ let pp = match redexp with
| None ->
let evars_of_term c = Evarutil.undefined_evars_of_term sigma c in
let l = Evar.Set.union (evars_of_term j.Environ.uj_val) (evars_of_term j.Environ.uj_type) in
let j = { j with Environ.uj_type = Reductionops.nf_betaiota env sigma j.Environ.uj_type } in
print_judgment env sigma j ++
- pr_ne_evar_set (fnl () ++ str "where" ++ fnl ()) (mt ()) sigma l ++
- Printer.pr_universe_ctx_set sigma uctx
+ pr_ne_evar_set (fnl () ++ str "where" ++ fnl ()) (mt ()) sigma l
| Some r ->
let (sigma,r_interp) = Hook.get f_interp_redexp env sigma r in
let redfun env evm c =
@@ -1722,6 +1721,8 @@ let vernac_check_may_eval ~atts redexp glopt rc =
c
in
print_eval redfun env sigma rc j
+ in
+ pp ++ Printer.pr_universe_ctx_set sigma uctx
let vernac_declare_reduction ~atts s r =
let local = make_locality atts.locality in