aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/tactic_debug.ml
diff options
context:
space:
mode:
authorGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-05-12 15:33:40 +0000
committerGravatar ppedrot <ppedrot@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-05-12 15:33:40 +0000
commitde26e97cf37cafd37b83377d2df062a6e82676e7 (patch)
tree1f093c94b7cb8ab59f301b9c5ee7ca712aa9fa0f /proofs/tactic_debug.ml
parent9a9a8ab4c2a07aa8faa04f50d6250930220b5be5 (diff)
Use the Hook module here and there.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16510 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs/tactic_debug.ml')
-rw-r--r--proofs/tactic_debug.ml15
1 files changed, 6 insertions, 9 deletions
diff --git a/proofs/tactic_debug.ml b/proofs/tactic_debug.ml
index 8ad92910f..d73561f37 100644
--- a/proofs/tactic_debug.ml
+++ b/proofs/tactic_debug.ml
@@ -12,12 +12,9 @@ open Pp
open Tacexpr
open Termops
-let prtac = ref (fun _ -> assert false)
-let set_tactic_printer f = prtac := f
-let prmatchpatt = ref (fun _ _ -> assert false)
-let set_match_pattern_printer f = prmatchpatt := f
-let prmatchrl = ref (fun _ -> assert false)
-let set_match_rule_printer f = prmatchrl := f
+let (prtac, tactic_printer) = Hook.make ()
+let (prmatchpatt, match_pattern_printer) = Hook.make ()
+let (prmatchrl, match_rule_printer) = Hook.make ()
(* This module intends to be a beginning of debugger for tactic expressions.
Currently, it is quite simple and we can hope to have, in the future, a more
@@ -62,7 +59,7 @@ let help () =
let goal_com g tac =
begin
db_pr_goal g;
- msg_tac_debug (str "Going to execute:" ++ fnl () ++ !prtac tac)
+ msg_tac_debug (str "Going to execute:" ++ fnl () ++ Hook.get prtac tac)
end
let skipped = ref 0
@@ -164,7 +161,7 @@ let db_pattern_rule debug num r =
if is_debug debug then
begin
msg_tac_debug (str "Pattern rule " ++ int num ++ str ":" ++ fnl () ++
- str "|" ++ spc () ++ !prmatchrl r)
+ str "|" ++ spc () ++ Hook.get prmatchrl r)
end
(* Prints the hypothesis pattern identifier if it exists *)
@@ -195,7 +192,7 @@ let db_hyp_pattern_failure debug env (na,hyp) =
if is_debug debug then
msg_tac_debug (str ("The pattern hypothesis"^(hyp_bound na)^
" cannot match: ") ++
- !prmatchpatt env hyp)
+ Hook.get prmatchpatt env hyp)
(* Prints a matching failure message for a rule *)
let db_matching_failure debug =