failwith "Disambiguate: circular dependency"
end
+module Trivial =
+struct
+ exception Ambiguous_term of string
+ exception Exit
+ module Callbacks =
+ struct
+ let interactive_user_uri_choice ~selection_mode ?ok
+ ?(enable_button_for_non_vars = true) ~title ~msg ~id uris =
+ raise Exit
+ let interactive_interpretation_choice interp = raise Exit
+ let input_or_locate_uri ~(title:string) ?id = raise Exit
+ end
+ module Disambiguator = Make (Callbacks)
+ let disambiguate_string ~dbd context metasenv ?initial_ugraph
+ ?(aliases = DisambiguateTypes.Environment.empty) term =
+ let ast = CicTextualParser2.parse_term (Stream.of_string term) in
+ try
+ Disambiguator.disambiguate_term ~dbd context metasenv ast ?initial_ugraph
+ ~aliases
+ with Exit -> raise (Ambiguous_term term)
+end
+
CicUniv.universe_graph) list (* disambiguated term *)
end
+module Trivial:
+sig
+ exception Ambiguous_term of string
+
+ (** disambiguate an _unanmbiguous_ term using dummy callbacks which fail if a
+ * choice from the user is needed to disambiguate the term
+ * @raise Ambiguous_term for ambiguous term *)
+ val disambiguate_string:
+ dbd:Mysql.dbd ->
+ Cic.context ->
+ Cic.metasenv ->
+ ?initial_ugraph:CicUniv.universe_graph ->
+ ?aliases:environment -> (* previous interpretation status *)
+ string ->
+ (environment * (* new interpretation status *)
+ Cic.metasenv * (* new metasenv *)
+ Cic.term *
+ CicUniv.universe_graph) list (* disambiguated term *)
+end
+