X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcic_disambiguation%2FdisambiguateTypes.ml;h=1eade4ca09850d1b6d6636d5b3bb8e203142e5ee;hb=f919cce8d299eab1dda92af4c5b53a8a7ac348af;hp=4a2e43a205dc88b25c6be961955246ca19dd5050;hpb=55b82bd235d82ff7f0a40d980effe1efde1f5073;p=helm.git diff --git a/helm/software/components/cic_disambiguation/disambiguateTypes.ml b/helm/software/components/cic_disambiguation/disambiguateTypes.ml index 4a2e43a20..1eade4ca0 100644 --- a/helm/software/components/cic_disambiguation/disambiguateTypes.ml +++ b/helm/software/components/cic_disambiguation/disambiguateTypes.ml @@ -40,7 +40,7 @@ type domain_item = | Symbol of string * int (* literal, instance num *) | Num of int (* instance num *) -exception Invalid_choice of string Lazy.t +exception Invalid_choice of Stdpp.location option * string Lazy.t module OrderedDomain = struct @@ -55,6 +55,16 @@ struct include Environment' + let find k env = + match k with + Symbol (sym,n) -> + (try find k env + with Not_found -> find (Symbol (sym,0)) env) + | Num n -> + (try find k env + with Not_found -> find (Num 0) env) + | _ -> find k env + let cons k v env = try let current = find k env in @@ -105,9 +115,10 @@ module type Callbacks = title:string -> msg:string -> id:string -> UriManager.uri list -> UriManager.uri list val interactive_interpretation_choice: - (string * string) list list -> int list + string -> int -> + (Stdpp.location list * string * string) list list -> int list val input_or_locate_uri: - title:string -> ?id:string -> unit -> UriManager.uri + title:string -> ?id:string -> unit -> UriManager.uri option end let string_of_domain_item = function