aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--contrib/romega/ROmega.v1
-rw-r--r--contrib/romega/ReflOmegaCore.v2
-rw-r--r--tactics/class_tactics.ml413
3 files changed, 12 insertions, 4 deletions
diff --git a/contrib/romega/ROmega.v b/contrib/romega/ROmega.v
index 991267ee5..68bc43bb6 100644
--- a/contrib/romega/ROmega.v
+++ b/contrib/romega/ROmega.v
@@ -7,4 +7,5 @@
*************************************************************************)
Require Import ReflOmegaCore.
+Require Export Setoid.
Require Export PreOmega.
diff --git a/contrib/romega/ReflOmegaCore.v b/contrib/romega/ReflOmegaCore.v
index ee44d6d21..46512aab0 100644
--- a/contrib/romega/ReflOmegaCore.v
+++ b/contrib/romega/ReflOmegaCore.v
@@ -7,7 +7,7 @@
*************************************************************************)
-Require Import List Bool Sumbool EqNat Ring_theory Decidable.
+Require Import List Bool Sumbool EqNat Setoid Ring_theory Decidable.
Delimit Scope Int_scope with I.
(* Abstract Integers. *)
diff --git a/tactics/class_tactics.ml4 b/tactics/class_tactics.ml4
index 8cf4d90a6..f00515ab6 100644
--- a/tactics/class_tactics.ml4
+++ b/tactics/class_tactics.ml4
@@ -1417,13 +1417,20 @@ let general_s_rewrite_in id l2r c ~new_goals gl =
let meta = Evarutil.new_meta() in
let hypinfo = ref (get_hyp gl c (Some id) l2r) in
cl_rewrite_clause_aux ~flags:general_rewrite_flags hypinfo meta [] (Some (([],id), [])) gl
-
+
+let classes_dirpath =
+ make_dirpath (List.map id_of_string ["Classes";"Coq"])
+
+let init_rewrite () =
+ if is_dirpath_prefix_of classes_dirpath (Lib.cwd ()) then ()
+ else check_required_library ["Coq";"Setoids";"Setoid"]
+
let general_s_rewrite_clause x =
- init_setoid ();
+ init_rewrite ();
match x with
| None -> general_s_rewrite
| Some id -> general_s_rewrite_in id
-
+
let _ = Equality.register_general_setoid_rewrite_clause general_s_rewrite_clause
(* [setoid_]{reflexivity,symmetry,transitivity} tactics *)