match !ProofEngine.proof with
None -> assert false
| Some (uri,metasenv,bo,ty) ->
- !qed_set_sensitive (List.length metasenv = 0) ;
+ if List.length metasenv = 0 then
+ begin
+ !qed_set_sensitive true ;
+prerr_endline "CSC: ###### REFRESH_PROOF, Hbugs.clear ()" ;
+ Hbugs.clear ()
+ end
+ else
+begin
+prerr_endline "CSC: ###### REFRESH_PROOF, Hbugs.notify ()" ;
+ Hbugs.notify () ;
+end ;
(*CSC: Wrong: [] is just plainly wrong *)
uri,
(Cic.CurrentProof (UriManager.name_of_uri uri, metasenv, bo, ty, []))
raise (InvokeTactics.RefreshSequentException e)
with Not_found -> prerr_endline ("Offending sequent " ^ string_of_int metano ^ " unknown."); raise (InvokeTactics.RefreshSequentException e)
-let __notify_hbugs = ref None;;
module InvokeTacticsCallbacks =
struct
let sequent_viewer () = (rendering_window ())#notebook#proofw
let decompose_uris_choice_callback = decompose_uris_choice_callback
let mk_fresh_name_callback = mk_fresh_name_callback
let output_html msg = output_html (outputhtml ()) msg
- let notify_hbugs () =
- match !__notify_hbugs with
- | Some f -> f ()
- | None -> assert false
end
;;
module InvokeTactics' = InvokeTactics.Make (InvokeTacticsCallbacks);;
-module Hbugs' = Hbugs.Make (InvokeTactics');;
-__notify_hbugs := Some Hbugs'.notify;;
+(* Just to initialize the Hbugs module *)
+module Ignore = Hbugs.Initialize (InvokeTactics');;
(** load an unfinished proof from filesystem *)
let load_unfinished_proof () =
("<h1 color=\"Green\">Current proof body loaded from " ^
prooffile ^ "</h1>") ;
!save_set_sensitive true;
- Hbugs'.notify ()
| _ -> assert false
with
InvokeTactics.RefreshSequentException e ->
!save_set_sensitive true ;
inputt#reset ;
ProofEngine.intros ~mk_fresh_name_callback () ;
- Hbugs'.notify ();
refresh_goals notebook ;
refresh_proof output
with
let factory6 = new GMenu.factory hbugs_menu ~accel_group in
let toggle_hbugs_menu_item =
factory6#add_check_item
- ~active:false ~key:GdkKeysyms._F5 ~callback:Hbugs'.toggle "HBugs enabled"
+ ~active:false ~key:GdkKeysyms._F5 ~callback:Hbugs.toggle "HBugs enabled"
in
(* settings menu *)
let settings_menu = factory0#add_submenu "Settings" in
Gdome_xslt.setDebugCallback
(Some (print_error_as_html "XSLT Debug Message: "));
rendering_window'#show () ;
-(* Hbugs'.toggle true; *)
+(* Hbugs.toggle true; *)
GtkThread.main ()
;;
initialize_everything () ;
if !usedb then Mqint.close ();
prerr_endline "FOO";
- Hbugs'.quit ()
+ Hbugs.quit ()
;;
try