(* implement module's API *)
+let only_one_pass = ref false;;
+
let disambiguate_thing ~aliases ~universe
~(f:?fresh_instances:bool ->
aliases:DisambiguateTypes.environment ->
let library = false, DisambiguateTypes.Environment.empty, None in
let multi_aliases = false, DisambiguateTypes.Environment.empty, universe in
let mono_aliases = true, aliases, Some DisambiguateTypes.Environment.empty in
- let passes = (* <fresh_instances?, aliases, coercions?> *)
+ let passes = (* <fresh_instances?, aliases, coercions?> *)
+ if !only_one_pass then
+ [ (false, mono_aliases, false) ]
+ else
[ (false, mono_aliases, false);
(false, multi_aliases, false);
(true, mono_aliases, false);
exception DisambiguationError of
int * (Token.flocation option * string Lazy.t) list list
+(** initially false; for debugging only (???) *)
+val only_one_pass: bool ref
+
type choose_uris_callback = id:string -> UriManager.uri list -> UriManager.uri list
type choose_interp_callback =
string -> int -> (Token.flocation list * string * string) list list ->
CicNotation.set_active_notations
(List.map fst (CicNotation.get_all_notations ())));
addDebugSeparator ();
+ addDebugItem "enable multiple disambiguation passes (default)"
+ (fun _ -> GrafiteDisambiguator.only_one_pass := false);
+ addDebugItem "enable only one disambiguation pass"
+ (fun _ -> GrafiteDisambiguator.only_one_pass := true);
+ addDebugSeparator ();
addDebugItem "enable coercions hiding"
(fun _ -> TermAcicContent.hide_coercions := true);
addDebugItem "disable coercions hiding"