aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-04-11 12:33:08 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-04-11 12:33:08 +0000
commitdf77da121b86c64a91ea729f39afc92f10676893 (patch)
tree9a2ce7ef77d064a56e666c387e79957a4aaafe70 /toplevel
parent2d30abfc8961b55e5a50671029b94a46a43b0026 (diff)
Check that no evars remain in instance types earlier at Instance
declarations. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10779 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/classes.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/toplevel/classes.ml b/toplevel/classes.ml
index 203fe118d..a539a87ba 100644
--- a/toplevel/classes.ml
+++ b/toplevel/classes.ml
@@ -485,6 +485,7 @@ let new_instance ctx (instid, bk, cl) props ?(tac:Proof_type.tactic option) ?(ho
in
if Lib.is_modtype () then
begin
+ Evarutil.check_evars env Evd.empty !isevars termtype;
let cst = Declare.declare_internal_constant id
(Entries.ParameterEntry (termtype,false), Decl_kinds.IsAssumption Decl_kinds.Logical)
in
@@ -533,7 +534,9 @@ let new_instance ctx (instid, bk, cl) props ?(tac:Proof_type.tactic option) ?(ho
Typeclasses.add_instance inst;
(match hook with Some h -> h cst | None -> ())
in
+ let termtype = Evarutil.nf_isevar !isevars termtype in
let evm = Evd.evars_of (undefined_evars !isevars) in
+ Evarutil.check_evars env Evd.empty !isevars termtype;
if evm = Evd.empty then
let cdecl =
let kind = IsDefinition Instance in