]> matita.cs.unibo.it Git - helm.git/commitdiff
added support for external configuration of describe_hint_callback
authorStefano Zacchiroli <zack@upsilon.cc>
Sun, 7 Sep 2003 09:50:09 +0000 (09:50 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Sun, 7 Sep 2003 09:50:09 +0000 (09:50 +0000)
helm/gTopLevel/hbugs.ml
helm/gTopLevel/hbugs.mli

index 19722a1d27c0446a2ac5a5313a5285401bb01ecf..833d11bfd9968e21ebba6db6021f97167e50763f 100644 (file)
@@ -31,13 +31,16 @@ open Printf;;
 
 let debug_print = 
   let debug = true in
-  fun s -> prerr_endline (sprintf "DEBUG: %s" s)
+  fun s -> prerr_endline (sprintf "HBUGS DEBUG: %s" s)
 ;;
 
 exception NoProofInProgress;;
 
 let hbugs_client = ref None
 let use_hint_callback = ref ignore
+let describe_hint_callback = ref ignore
+
+let set_describe_hint_callback c = describe_hint_callback := c
 
 let quit () =
        match !hbugs_client with
@@ -89,7 +92,9 @@ let rec enable () =
                        hbugs_client :=
                                (try
                                        Some (new Hbugs_client.hbugsClient
-            ~use_hint_callback:!use_hint_callback ())
+            ~use_hint_callback:!use_hint_callback
+            ~describe_hint_callback:!describe_hint_callback
+              ())
                                with e ->
                                        prerr_endline (sprintf "Can't start HBugs client: %s"
                                                (Printexc.to_string e));
index b98a641afedbf42d9e0d3d41d240ada0164498ed..70687afcaee8b1a817459d98962ce7f209ffb8e9 100644 (file)
@@ -48,3 +48,10 @@ module Initialize (Tactics: InvokeTactics.Tactics) : Unit
 val start_web_services: unit -> unit
 val stop_web_services: unit -> unit
 
+(* Other callbacks *)
+
+open Hbugs_types
+
+  (* what to do when the user single click on an hint *)
+val set_describe_hint_callback: (hint -> unit) -> unit
+