X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Fgrafite_parser%2FgrafiteDisambiguator.ml;h=8827e709b42328072edcb01591e9422ef73ba9e1;hb=fd93fa0155994b70482e0f07d8e45c238cce835d;hp=4f812ff2f032abae8448782165da6bdc544d5bea;hpb=8b20a402003f57320cb9f0cc2eedebbceb16d3fc;p=helm.git diff --git a/helm/software/components/grafite_parser/grafiteDisambiguator.ml b/helm/software/components/grafite_parser/grafiteDisambiguator.ml index 4f812ff2f..8827e709b 100644 --- a/helm/software/components/grafite_parser/grafiteDisambiguator.ml +++ b/helm/software/components/grafite_parser/grafiteDisambiguator.ml @@ -27,13 +27,17 @@ open Printf +let debug = false;; +let debug_print s = + if debug then prerr_endline (Lazy.force s);; + exception Ambiguous_input (* the integer is an offset to be added to each location *) exception DisambiguationError of int * - ((Token.flocation list * string * string) list * + ((Stdpp.location list * string * string) list * (DisambiguateTypes.domain_item * DisambiguateTypes.codomain_item) list * - Token.flocation option * string Lazy.t * bool) list list + Stdpp.location option * string Lazy.t * bool) list list (** parameters are: option name, error message *) exception Unbound_identifier of string @@ -42,7 +46,7 @@ type choose_uris_callback = type choose_interp_callback = string -> int -> - (Token.flocation list * string * string) list list -> int list + (Stdpp.location list * string * string) list list -> int list let mono_uris_callback ~id = if Helm_registry.get_opt_default Helm_registry.get_bool ~default:true @@ -119,7 +123,7 @@ let disambiguate_thing ~aliases ~universe drop_aliases_and_clear_diff res in let rec aux i errors passes = -(*prerr_endline ("Pass: " ^ string_of_int i);*) + debug_print (lazy ("Pass: " ^ string_of_int i)); match passes with [ pass ] -> (try