(Cic.term, Cic.lazy_term, Cic.lazy_term GrafiteAst.reduction, string)
GrafiteAst.tactic
-let singleton = function
+let singleton msg = function
| [x], _ -> x
- | _ -> assert false
-;;
+ | l, _ ->
+ let debug =
+ Printf.sprintf "GrafiteDisambiguate.singleton (%s): %u interpretations"
+ msg (List.length l)
+ in
+ HLog.debug debug; assert false
(** @param term not meaningful when context is given *)
let disambiguate_term text prefix_len lexicon_status_ref context metasenv term =
let lexicon_status = !lexicon_status_ref in
let (diff, metasenv, cic, _) =
- singleton
+ singleton "first"
(GrafiteDisambiguator.disambiguate_term ~dbd:(LibraryDb.instance ())
~aliases:lexicon_status.LexiconEngine.aliases
~universe:(Some lexicon_status.LexiconEngine.multi_aliases)
(fun context metasenv ugraph ->
let lexicon_status = !lexicon_status_ref in
let (diff, metasenv, cic, ugraph) =
- singleton
+ singleton "second"
(GrafiteDisambiguator.disambiguate_term ~dbd:(LibraryDb.instance ())
~initial_ugraph:ugraph ~aliases:lexicon_status.LexiconEngine.aliases
~universe:(Some lexicon_status.LexiconEngine.multi_aliases)
| CicNotationPt.Inductive _ -> assert false
| CicNotationPt.Theorem _ -> None in
let (diff, metasenv, cic, _) =
- singleton
+ singleton "third"
(GrafiteDisambiguator.disambiguate_obj ~dbd:(LibraryDb.instance ())
~aliases:lexicon_status.LexiconEngine.aliases
~universe:(Some lexicon_status.LexiconEngine.multi_aliases) ~uri