diff options
| author | jforest | 2007-10-02 07:43:54 +0000 |
|---|---|---|
| committer | jforest | 2007-10-02 07:43:54 +0000 |
| commit | 5a419bafdb21fd61c4c5c0784c1a0156d5ec7005 (patch) | |
| tree | b22ea08354e8a0872a9595469b4d39716b1c3482 /tactics/setoid_replace.ml | |
| parent | c3b607d94cb14217311617919886ba404a5c3edd (diff) | |
Correcting error message when adding Setoid, Relation or morphism (bug #1626)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10162 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics/setoid_replace.ml')
| -rw-r--r-- | tactics/setoid_replace.ml | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/tactics/setoid_replace.ml b/tactics/setoid_replace.ml index 840cf979e4..176c9c4486 100644 --- a/tactics/setoid_replace.ml +++ b/tactics/setoid_replace.ml @@ -943,6 +943,7 @@ type morphism_signature = (bool option * Topconstr.constr_expr) list * Topconstr.constr_expr let new_named_morphism id m sign = + Coqlib.check_required_library ["Coq";"Setoids";"Setoid_tac"]; let sign = match sign with None -> None @@ -1130,21 +1131,23 @@ let int_add_relation id a aeq refl sym trans = (* The vernac command "Add Relation ..." *) let add_relation id a aeq refl sym trans = - int_add_relation id (constr_of a) (constr_of aeq) (option_map constr_of refl) - (option_map constr_of sym) (option_map constr_of trans) + Coqlib.check_required_library ["Coq";"Setoids";"Setoid_tac"]; + int_add_relation id (constr_of a) (constr_of aeq) (option_map constr_of refl) + (option_map constr_of sym) (option_map constr_of trans) (************************ Add Setoid ******************************************) (* The vernac command "Add Setoid" *) let add_setoid id a aeq th = - let a = constr_of a in - let aeq = constr_of aeq in - let th = constr_of th in - let env = Global.env () in - let a_quantifiers_rev = check_a env a in + Coqlib.check_required_library ["Coq";"Setoids";"Setoid_tac"]; + let a = constr_of a in + let aeq = constr_of aeq in + let th = constr_of th in + let env = Global.env () in + let a_quantifiers_rev = check_a env a in check_eq env a_quantifiers_rev a aeq ; check_setoid_theory env a_quantifiers_rev a aeq th ; - let a_instance = apply_to_rels a a_quantifiers_rev in + let a_instance = apply_to_rels a a_quantifiers_rev in let aeq_instance = apply_to_rels aeq a_quantifiers_rev in let th_instance = apply_to_rels th a_quantifiers_rev in let refl = |
