diff options
author | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-03-28 21:33:22 +0000 |
---|---|---|
committer | msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-03-28 21:33:22 +0000 |
commit | 2d8aa8a39eaa4e44d9ece9fdfbcbf4bc4a516dec (patch) | |
tree | 13d7057dd5f4dec9c8f0d5d20c5d0059478d211d | |
parent | 8cadbeff68559ee4a621f9ac3ed44c5e5da7a8ba (diff) |
Fix useless redeclaration of a tactic name when UpdateTac is replayed.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12031 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | tactics/tacinterp.ml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tactics/tacinterp.ml b/tactics/tacinterp.ml index d926684b3..29b71fad4 100644 --- a/tactics/tacinterp.ml +++ b/tactics/tacinterp.ml @@ -2768,6 +2768,7 @@ let bad_tactic_args s = (* Declaration of the TAC-DEFINITION object *) let add (kn,td) = mactab := Gmap.add kn td !mactab +let replace (kn,td) = mactab := Gmap.add kn td (Gmap.remove kn !mactab) type tacdef_kind = | NewTac of identifier | UpdateTac of ltac_constant @@ -2782,9 +2783,7 @@ let load_md i ((sp,kn),defs) = let kn = Names.make_kn mp dir (label_of_id id) in Nametab.push_tactic (Until i) sp kn; add (kn,t) - | UpdateTac kn -> - mactab := Gmap.remove kn !mactab; - add (kn,t)) defs + | UpdateTac kn -> replace (kn,t)) defs let open_md i((sp,kn),defs) = let dp,_ = repr_path sp in @@ -2795,10 +2794,7 @@ let open_md i((sp,kn),defs) = let sp = Libnames.make_path dp id in let kn = Names.make_kn mp dir (label_of_id id) in Nametab.push_tactic (Exactly i) sp kn - | UpdateTac kn -> - let (path, id) = decode_kn kn in - let sp = Libnames.make_path path id in - Nametab.push_tactic (Exactly i) sp kn) defs + | UpdateTac kn -> ()) defs let cache_md x = load_md 1 x |