X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitacLib.ml;h=3567c33f0a14575c683a75384381cab7c82dca61;hb=ef465722a7f3314832fa4ef2d0265288ee74c87b;hp=7150c6f775cb57fecf8340070db8d3c659c8d424;hpb=a229a988dceead9ffe3ea593fcf98e68a16582cf;p=helm.git diff --git a/helm/matita/matitacLib.ml b/helm/matita/matitacLib.ml index 7150c6f77..3567c33f0 100644 --- a/helm/matita/matitacLib.ml +++ b/helm/matita/matitacLib.ml @@ -23,6 +23,8 @@ * http://helm.cs.unibo.it/ *) +(* $Id$ *) + open Printf open GrafiteTypes @@ -117,15 +119,20 @@ let rec interactive_loop () = "matita.includes")) with | GrafiteEngine.Drop -> pp_ocaml_mode () + | GrafiteEngine.Macro (floc,_) -> + let x, y = HExtlib.loc_of_floc floc in + HLog.error + (sprintf "A macro has been found in a script at %d-%d" x y); + interactive_loop () | Sys.Break -> HLog.error "user break!"; interactive_loop () | GrafiteTypes.Command_error _ -> interactive_loop () | End_of_file -> print_newline (); clean_exit (Some 0) | HExtlib.Localized (floc,CicNotationParser.Parse_error err) -> - let (x, y) = HExtlib.loc_of_floc floc in - HLog.error (sprintf "Parse error at %d-%d: %s" x y err); - interactive_loop () + let x, y = HExtlib.loc_of_floc floc in + HLog.error (sprintf "Parse error at %d-%d: %s" x y err); + interactive_loop () | exn -> HLog.error (Printexc.to_string exn); interactive_loop () let go () = @@ -234,6 +241,14 @@ let main ~mode = clean_exit (Some 1) else pp_ocaml_mode () + | GrafiteEngine.Macro (floc,_) -> + let x, y = HExtlib.loc_of_floc floc in + HLog.error + (sprintf "A macro has been found in a script at %d-%d" x y); + if mode = `COMPILER then + clean_exit (Some 1) + else + pp_ocaml_mode () | HExtlib.Localized (floc,CicNotationParser.Parse_error err) -> let (x, y) = HExtlib.loc_of_floc floc in HLog.error (sprintf "Parse error at %d-%d: %s" x y err);