X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fmatita.ml;h=d63e327f03b89e8d68a58b7ce2a80e68e945ff78;hb=d79c894cab905cd98487192b0e5f1049875b7caa;hp=c559358c575934b67883baad1e9bd4286881fd32;hpb=5c1b44dfefa085fbb56e23047652d3650be9d855;p=helm.git diff --git a/helm/software/matita/matita.ml b/helm/software/matita/matita.ml index c559358c5..d63e327f0 100644 --- a/helm/software/matita/matita.ml +++ b/helm/software/matita/matita.ml @@ -105,7 +105,9 @@ let _ = (** {{{ Debugging *) let _ = - if BuildTimeConf.debug then begin + if BuildTimeConf.debug || + Helm_registry.get_bool "matita.debug_menu" + then begin gui#main#debugMenu#misc#show (); let addDebugItem ~label callback = let item = @@ -114,6 +116,9 @@ let _ = let addDebugSeparator () = ignore (GMenu.separator_item ~packing:gui#main#debugMenu_menu#append ()) in + addDebugItem "dump aliases" (fun _ -> + let status = script#lexicon_status in + HLog.debug (DisambiguatePp.pp_environment status.LexiconEngine.aliases)); addDebugItem "dump environment to \"env.dump\"" (fun _ -> let oc = open_out "env.dump" in CicEnvironment.dump_to_channel oc; @@ -166,8 +171,10 @@ let _ = (MatitaScript.current ())#grafite_status.GrafiteTypes.proof_status with | GrafiteTypes.No_proof -> (Cic.Implicit None) - | Incomplete_proof i -> let _,_,_subst,p,_, _ = i.GrafiteTypes.proof in p - | Proof p -> let _,_,_subst,p,_, _ = p in p + | Incomplete_proof i -> + let _,_,_subst,p,_, _ = i.GrafiteTypes.proof in + Lazy.force p + | Proof p -> let _,_,_subst,p,_, _ = p in Lazy.force p | Intermediate _ -> assert false))); addDebugItem "Print current proof (natural language) to stderr" (fun _ -> @@ -181,9 +188,9 @@ let _ = | GrafiteTypes.No_proof -> assert false | Incomplete_proof i -> let _,m,_subst,p,ty, attrs = i.GrafiteTypes.proof in - Cic.CurrentProof ("current (incomplete) proof",m,p,ty,[],attrs) + Cic.CurrentProof ("current (incomplete) proof",m,Lazy.force p,ty,[],attrs) | Proof (_,m,_subst,p,ty, attrs) -> - Cic.CurrentProof ("current proof",m,p,ty,[],attrs) + Cic.CurrentProof ("current proof",m,Lazy.force p,ty,[],attrs) | Intermediate _ -> assert false))); (* addDebugItem "ask record choice" (fun _ -> @@ -255,11 +262,11 @@ let _ = HLog.debug ((String.concat "," (List.map - (fun u,saturations -> + (fun u,saturations,_ -> UriManager.name_of_uri u ^ "(" ^ string_of_int saturations ^ ")") ul)) ^ ":" - ^ CoercDb.name_of_carr s ^ " -> " ^ CoercDb.name_of_carr t)) + ^ CoercDb.string_of_carr s ^ " -> " ^ CoercDb.string_of_carr t)) (CoercDb.to_list ())); addDebugSeparator (); let mview () = (MatitaMathView.sequentsViewer_instance ())#cicMathView in