X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2FmatitacLib.ml;h=cb3b2d1c8bf8184d71c80ae3c27e6ebd185dce20;hb=e9b482856904b32a5c92eee8bcd860ffe74fa74f;hp=844d4f5d854dd723ba1f3390d6b449674596608f;hpb=d90d73349df641ea2d18b4c2ff4fe9d970861778;p=helm.git diff --git a/matita/matitacLib.ml b/matita/matitacLib.ml index 844d4f5d8..cb3b2d1c8 100644 --- a/matita/matitacLib.ml +++ b/matita/matitacLib.ml @@ -33,7 +33,7 @@ exception AttemptToInsertAnAlias let pp_ast_statement = GrafiteAstPp.pp_statement ~term_pp:CicNotationPp.pp_term - ~lazy_term_pp:CicNotationPp.pp_term ~obj_pp:CicNotationPp.pp_obj + ~lazy_term_pp:CicNotationPp.pp_term ~obj_pp:(CicNotationPp.pp_obj CicNotationPp.pp_term) (** {2 Initialization} *) @@ -63,6 +63,7 @@ let run_script is eval_function = in HLog.debug ("Executing: ``" ^ stm ^ "''")) in + let matita_debug = Helm_registry.get_bool "matita.debug" in try let grafite_status'', lexicon_status'' = match eval_function lexicon_status' grafite_status' is cb with @@ -77,7 +78,8 @@ let run_script is eval_function = | End_of_file | CicNotationParser.Parse_error _ as exn -> raise exn | exn -> - HLog.error (snd (MatitaExcPp.to_string exn)); + if not matita_debug then + HLog.error (snd (MatitaExcPp.to_string exn)) ; raise exn let fname () = @@ -173,7 +175,7 @@ let pp_times fname bench_mode rc big_bang = else "matitac" in - let rc = if rc then "OK" else "FAIL" in + let rc = if rc then "OK" else "FAIL" in let times = let fmt t = let seconds = int_of_float t in @@ -275,7 +277,7 @@ let main ~mode = end else begin - let baseuri = + let baseuri, _fullpathforfname = DependenciesParser.baseuri_of_script ~include_paths fname in let moo_fname = LibraryMisc.obj_file_of_baseuri @@ -298,7 +300,8 @@ let main ~mode = exit 0 end with - | Sys.Break -> + | Sys.Break as exn -> + if matita_debug then raise exn; HLog.error "user break!"; pp_times fname bench_mode false big_bang; if mode = `COMPILER then