]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaDisambiguator.mli
ocaml 3.09 transition
[helm.git] / helm / matita / matitaDisambiguator.mli
index ce89b6e084351631aaf92e2d739de7ad3bd31f07..7e207e12fd7970f742daed95357c959d784dbb5e 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2004, HELM Team.
+(* Copyright (C) 2004-2005, HELM Team.
  * 
  * This file is part of HELM, an Hypertextual, Electronic
  * Library of Mathematics, developed at the Computer Science
  * http://helm.cs.unibo.it/
  *)
 
-class parserr: unit ->
-  object
-    inherit MatitaTypes.parserr
-  end
-
-class disambiguator:
-  parserr:MatitaTypes.parserr -> (** parser *)
-  mqiconn:MQIConn.handle -> (** mathql database connection *)
-  chooseUris:MatitaTypes.choose_uris_callback ->
-  chooseInterp:MatitaTypes.choose_interp_callback ->
-    unit ->
-      object
-        inherit MatitaTypes.disambiguator
-      end
+open MatitaTypes
 
+(** raised when ambiguous input is found but not expected (e.g. in the batch
+  * compiler) *)
+exception Ambiguous_input
+exception DisambiguationError of string Lazy.t list list
+
+type choose_uris_callback = id:string -> UriManager.uri list -> UriManager.uri list
+type choose_interp_callback = (string * string) list list -> int list
+
+val set_choose_uris_callback:   choose_uris_callback -> unit
+val set_choose_interp_callback: choose_interp_callback -> unit
+
+(** @raise Ambiguous_input if called, default value for internal
+  * choose_uris_callback if not set otherwise with set_choose_uris_callback
+  * above *)
+val mono_uris_callback: choose_uris_callback
+
+(** @raise Ambiguous_input if called, default value for internal
+  * choose_interp_callback if not set otherwise with set_choose_interp_callback
+  * above *)
+val mono_interp_callback: choose_interp_callback
+
+(** for GUI callbacks see MatitaGui.interactive_{interp,user_uri}_choice *)
+
+include Disambiguate.Disambiguator