diff options
-rw-r--r-- | plugins/subtac/subtac.ml | 5 | ||||
-rw-r--r-- | tactics/rewrite.ml4 | 11 | ||||
-rw-r--r-- | theories/Classes/Init.v | 9 | ||||
-rw-r--r-- | theories/Classes/Morphisms_Relations.v | 1 | ||||
-rw-r--r-- | theories/Classes/RelationClasses.v | 2 | ||||
-rw-r--r-- | theories/Classes/SetoidClass.v | 2 |
6 files changed, 11 insertions, 19 deletions
diff --git a/plugins/subtac/subtac.ml b/plugins/subtac/subtac.ml index d10c8f68c..36dc5f2ae 100644 --- a/plugins/subtac/subtac.ml +++ b/plugins/subtac/subtac.ml @@ -54,8 +54,8 @@ let solve_tccs_in_type env id isevars evm c typ = let stmt_id = Nameops.add_suffix id "_stmt" in let obls, c', t' = eterm_obligations env stmt_id !isevars evm 0 ~status:Expand c typ in match Subtac_obligations.add_definition stmt_id c' typ obls with - Subtac_obligations.Defined cst -> constant_value (Global.env()) - (match cst with ConstRef kn -> kn | _ -> assert false) + | Subtac_obligations.Defined cst -> constant_value (Global.env()) + (match cst with ConstRef kn -> kn | _ -> assert false) | _ -> errorlabstrm "start_proof" (str "The statement obligations could not be resolved automatically, " ++ spc () ++ @@ -127,7 +127,6 @@ let check_fresh (loc,id) = let subtac (loc, command) = check_required_library ["Coq";"Init";"Datatypes"]; check_required_library ["Coq";"Init";"Specif"]; - check_required_library ["Coq";"Program";"Tactics"]; let env = Global.env () in let isevars = ref (create_evar_defs Evd.empty) in try diff --git a/tactics/rewrite.ml4 b/tactics/rewrite.ml4 index 147e5384e..8efb0176e 100644 --- a/tactics/rewrite.ml4 +++ b/tactics/rewrite.ml4 @@ -42,18 +42,18 @@ open Evd (** Typeclass-based generalized rewriting. *) -let check_imported_library d = +let check_required_library d = let d' = List.map id_of_string d in let dir = make_dirpath (List.rev d') in if not (Library.library_is_loaded dir) then - error ("Library "^(list_last d)^" has to be imported first.") + error ("Library "^(list_last d)^" has to be required first.") let classes_dirpath = make_dirpath (List.map id_of_string ["Classes";"Coq"]) let init_setoid () = if is_dirpath_prefix_of classes_dirpath (Lib.cwd ()) then () - else check_imported_library ["Coq";"Setoids";"Setoid"] + else check_required_library ["Coq";"Setoids";"Setoid"] let morphism_class = lazy (class_info (Nametab.global (Qualid (dummy_loc, qualid_of_string "Coq.Classes.Morphisms.Morphism")))) @@ -156,9 +156,6 @@ let is_applied_setoid_relation t = let _ = Equality.register_is_applied_setoid_relation is_applied_setoid_relation -exception Found of (constr * constr * (types * types) list * constr * constr array * - (constr * (constr * constr * constr * constr)) option array) - let split_head = function hd :: tl -> hd, tl | [] -> assert(false) @@ -1306,7 +1303,7 @@ let try_loaded f gl = let not_declared env ty rel = tclFAIL 0 (str" The relation " ++ Printer.pr_constr_env env rel ++ str" is not a declared " ++ - str ty ++ str" relation. Maybe you need to import the Setoid library") + str ty ++ str" relation. Maybe you need to require the Setoid library") let relation_of_constr env c = match kind_of_term c with diff --git a/theories/Classes/Init.v b/theories/Classes/Init.v index 7fb48aa43..a2a90978d 100644 --- a/theories/Classes/Init.v +++ b/theories/Classes/Init.v @@ -15,11 +15,6 @@ (* $Id$ *) -(* Ltac typeclass_instantiation := typeclasses eauto || eauto. *) - -Tactic Notation "clapply" ident(c) := - eapply @c ; typeclasses eauto. - (** Hints for the proof search: these combinators should be considered rigid. *) Require Import Coq.Program.Basics. @@ -29,12 +24,12 @@ Typeclasses Opaque id const flip compose arrow impl iff. (** The unconvertible typeclass, to test that two objects of the same type are actually different. *) -Class Unconvertible (A : Type) (a b : A). +Class Unconvertible (A : Type) (a b : A) := unconvertible : unit. Ltac unconvertible := match goal with | |- @Unconvertible _ ?x ?y => unify x y with typeclass_instances ; fail 1 "Convertible" - | |- _ => eapply Build_Unconvertible + | |- _ => exact tt end. Hint Extern 0 (@Unconvertible _ _ _) => unconvertible : typeclass_instances.
\ No newline at end of file diff --git a/theories/Classes/Morphisms_Relations.v b/theories/Classes/Morphisms_Relations.v index 24b8d6364..4654e654a 100644 --- a/theories/Classes/Morphisms_Relations.v +++ b/theories/Classes/Morphisms_Relations.v @@ -12,6 +12,7 @@ Institution: LRI, CNRS UMR 8623 - UniversitĂcopyright Paris Sud 91405 Orsay, France *) +Require Import Relation_Definitions. Require Import Coq.Classes.Morphisms. Require Import Coq.Program.Program. diff --git a/theories/Classes/RelationClasses.v b/theories/Classes/RelationClasses.v index 3ddba8ee8..88fba1a30 100644 --- a/theories/Classes/RelationClasses.v +++ b/theories/Classes/RelationClasses.v @@ -18,7 +18,7 @@ Require Export Coq.Classes.Init. Require Import Coq.Program.Basics. Require Import Coq.Program.Tactics. -Require Export Coq.Relations.Relation_Definitions. +Require Import Coq.Relations.Relation_Definitions. (** We allow to unfold the [relation] definition while doing morphism search. *) diff --git a/theories/Classes/SetoidClass.v b/theories/Classes/SetoidClass.v index ae03e28e5..3e4e58ace 100644 --- a/theories/Classes/SetoidClass.v +++ b/theories/Classes/SetoidClass.v @@ -19,7 +19,7 @@ Unset Strict Implicit. Require Import Coq.Program.Program. -Require Import Coq.Classes.Init. +Require Import Relation_Definitions. Require Export Coq.Classes.RelationClasses. Require Export Coq.Classes.Morphisms. Require Import Coq.Classes.Functions. |