X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fdisambiguation%2FmultiPassDisambiguator.ml;h=b1cf9aed0ec55f13e3317489b8e9f63e044d1ffe;hb=e9b09b14538f770b9e65083c24e3e9cf487df648;hp=63bcaa587197b08da14e9b211f2cb4688085016e;hpb=2cfd3d24d73634238d5eaf40f91e12c10fe28d71;p=helm.git diff --git a/helm/software/components/disambiguation/multiPassDisambiguator.ml b/helm/software/components/disambiguation/multiPassDisambiguator.ml index 63bcaa587..b1cf9aed0 100644 --- a/helm/software/components/disambiguation/multiPassDisambiguator.ml +++ b/helm/software/components/disambiguation/multiPassDisambiguator.ml @@ -27,9 +27,9 @@ open Printf -let debug = false;; +let debug = ref false;; let debug_print s = - if debug then prerr_endline (Lazy.force s);; + if !debug then prerr_endline (Lazy.force s) else ();; exception DisambiguationError of int * @@ -51,6 +51,8 @@ let passes () = (* *) (* for demo to reduce the number of interpretations *) (true, `Library, true); ] + else if !debug then + [ (true, `Multi, true); ] else [ (true, `Mono, false); (true, `Multi, false); @@ -141,19 +143,22 @@ let disambiguate_thing ~description_of_alias ~passes ~aliases ~universe ~f thing | [] -> assert false in aux 1 [] passes +;; let disambiguate_thing ~passes ~freshen_thing ~context ~metasenv ~subst - ~string_context_of_context ~initial_ugraph ~hint ~mk_implicit - ~description_of_alias ~aliases ~universe ~lookup_in_library ~uri ~pp_thing - ~domain_of_thing ~interpretate_thing ~refine_thing ~mk_localization_tbl thing + ~string_context_of_context ~initial_ugraph ~expty ~mk_implicit + ~description_of_alias ~fix_instance ~aliases ~universe ~lookup_in_library + ~uri ~pp_thing ~domain_of_thing ~interpretate_thing ~refine_thing + ~mk_localization_tbl thing = let f ~fresh_instances ~aliases ~universe ~use_coercions (txt,len,thing) = let thing = if fresh_instances then freshen_thing thing else thing in Disambiguate.disambiguate_thing ~context ~metasenv ~subst ~use_coercions ~string_context_of_context - ~initial_ugraph ~hint ~mk_implicit ~description_of_alias + ~initial_ugraph ~expty ~mk_implicit ~description_of_alias ~fix_instance ~aliases ~universe ~lookup_in_library ~uri ~pp_thing ~domain_of_thing ~interpretate_thing ~refine_thing ~mk_localization_tbl (txt,len,thing) in - disambiguate_thing ~description_of_alias ~passes ~aliases ~universe ~f thing + disambiguate_thing ~description_of_alias ~passes ~aliases + ~universe ~f thing