diff options
| author | Pierre-Marie Pédrot | 2014-05-01 17:44:51 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2014-05-01 17:44:51 +0200 |
| commit | 004044b5a377dc36938dc83125cbffb4eae7838c (patch) | |
| tree | ef8b782d52cba8fad16c77b3df92da0a91c2764a | |
| parent | c7b9eebd6e754672d0d57ea6a376bd3d7abf0159 (diff) | |
Allowing the "Declare Instance" command anywhere. This was artificially
restricted to module types, although it was nothing more than a short hand
for Axiom + Existing Instance.
| -rw-r--r-- | toplevel/classes.ml | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/toplevel/classes.ml b/toplevel/classes.ml index 6c447e886c..2e17f646bd 100644 --- a/toplevel/classes.ml +++ b/toplevel/classes.ml @@ -165,8 +165,6 @@ let new_instance ?(abstract=false) ?(global=false) ctx (instid, bk, cl) props let subst = List.map (Evarutil.nf_evar sigma) subst in if abstract then begin - if not (Lib.is_modtype ()) then - error "Declare Instance while not in Module Type."; let _, ty_constr = instance_constructor k (List.rev subst) in let termtype = let t = it_mkProd_or_LetIn ty_constr (ctx' @ ctx) in |
