X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2FmatitaExcPp.ml;h=24981af6bc6e754b4595b9b04614a26b478ea050;hb=c5cee90d95a54db8897a688f0bade4c503d82e15;hp=03f0be3dc7ffba31016c88831c34bb3f45a7f56e;hpb=1df136280cced19d29b62451c8c03948070259d8;p=helm.git diff --git a/helm/software/matita/matitaExcPp.ml b/helm/software/matita/matitaExcPp.ml index 03f0be3dc..24981af6b 100644 --- a/helm/software/matita/matitaExcPp.ml +++ b/helm/software/matita/matitaExcPp.ml @@ -117,10 +117,6 @@ let rec to_string = let _,msg = to_string exn in let (x, y) = HExtlib.loc_of_floc floc in Some floc, sprintf "Error at %d-%d: %s" x y msg - | GrafiteTypes.Option_error ("baseuri", "not found" ) -> - None, - "Baseuri not set for this script. " - ^ "Use 'set \"baseuri\" \"\".' to set it." | GrafiteTypes.Command_error msg -> None, "Error: " ^ msg | CicNotationParser.Parse_error err -> None, sprintf "Parse error: %s" err @@ -151,7 +147,34 @@ let rec to_string = None, "Already defined: " ^ UriManager.string_of_uri s | CoercDb.EqCarrNotImplemented msg -> None, ("EqCarrNotImplemented: " ^ Lazy.force msg) + | MatitaEngine.EnrichedWithLexiconStatus (exn,_) -> + None, "EnrichedWithLexiconStatus "^snd(to_string exn) | GrafiteDisambiguator.DisambiguationError (offset,errorll) -> + let loc = + match errorll with + ((_,_,Some floc,_,_)::_)::_ -> + let (x, y) = HExtlib.loc_of_floc floc in + let x = x + offset in + let y = y + offset in + let floc = HExtlib.floc_of_loc (x,y) in + Some floc + | _ -> None in + let annotated_errorll = + List.rev + (snd + (List.fold_left (fun (pass,res) item -> pass+1,(pass+1,item)::res) + (0,[]) errorll)) in + let choices = compact_disambiguation_errors true annotated_errorll in + let errorll = + (List.map + (function (loffset,l) -> + List.map + (function + passes,envs_and_diffs,msg,significant -> + let _,env,diff = List.hd envs_and_diffs in + passes,env,diff,loffset,msg,significant + ) l + ) choices) in let rec aux = function [] -> [] @@ -170,15 +193,6 @@ let rec to_string = passes) phase) in msg@aux tl in - let loc = - match errorll with - ((_,_,Some floc,_,_)::_)::_ -> - let (x, y) = HExtlib.loc_of_floc floc in - let x = x + offset in - let y = y + offset in - let floc = HExtlib.floc_of_loc (x,y) in - Some floc - | _ -> None in let rec explain = function [] -> "" @@ -189,26 +203,6 @@ let rec to_string = String.concat "," (List.map string_of_int phases) ^": *****\n"^ msg ^ "\n\n" in - (* --- *) - let annotated_errorll = - List.rev - (snd - (List.fold_left (fun (pass,res) item -> pass+1,(pass+1,item)::res) (0,[]) - errorll)) in - let choices = compact_disambiguation_errors true annotated_errorll in - (* --- *) - let errorll = - (List.map - (function (loffset,l) -> - List.map - (function - passes,envs_and_diffs,msg,significant -> - let _,env,diff = List.hd envs_and_diffs in - passes,env,diff,loffset,msg,significant - ) l - ) choices) in - (* --- *) - loc, "********** DISAMBIGUATION ERRORS: **********\n" ^ explain (aux errorll)