aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/classes.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2013-10-17 14:55:57 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2014-05-06 09:58:53 +0200
commit84cbc09bd1400f732a6c70e8a840e4c13d018478 (patch)
treef6b3417e653bea9de8f0d8f510ad19ccdbb4840e /toplevel/classes.ml
parent57bee17f928fc67a599d2116edb42a59eeb21477 (diff)
Correct rebase on STM code. Thanks to E. Tassi for help on dealing with
latent universes. Now the universes in the type of a definition/lemma are eagerly added to the environment so that later proofs can be checked independently of the original (delegated) proof body. - Fixed firstorder, ring to work correctly with universe polymorphism. - Changed constr_of_global to raise an anomaly if side effects would be lost by turning a polymorphic constant into a constr. - Fix a non-termination issue in solve_evar_evar. -
Diffstat (limited to 'toplevel/classes.ml')
-rw-r--r--toplevel/classes.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/toplevel/classes.ml b/toplevel/classes.ml
index cf47abf44..45dd6f1ec 100644
--- a/toplevel/classes.ml
+++ b/toplevel/classes.ml
@@ -55,7 +55,7 @@ let declare_class g =
(** TODO: add subinstances *)
let existing_instance glob g pri =
let c = global g in
- let instance = Typing.type_of (Global.env ()) Evd.empty (Universes.constr_of_global c) in
+ let instance = Global.type_of_global_unsafe c in
let _, r = decompose_prod_assum instance in
match class_of_constr r with
| Some (_, ((tc,u), _)) -> add_instance (new_instance tc pri glob
@@ -356,7 +356,7 @@ let context l =
let impl = List.exists test impls in
let decl = (Discharge, (Flags.use_polymorphic_flag ()), Definitional) in
let nstatus =
- snd (Command.declare_assumption false decl (t, uctx) [] impl
+ pi3 (Command.declare_assumption false decl (t, uctx) [] impl
Vernacexpr.NoInline (Loc.ghost, id))
in
status && nstatus