X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcic_disambiguation%2Fdisambiguate.ml;h=cb4d85cfd245fafb088410a89b092dd4b8375972;hb=4f12c6bc7fb5f1ba3bd42f78abddb77b3b0a8f93;hp=85f05aa1c8700048224840ed34f262f21e0e29f8;hpb=9c9e979d4c45cf3b1ee01688b2c36fe49190ce98;p=helm.git diff --git a/helm/software/components/cic_disambiguation/disambiguate.ml b/helm/software/components/cic_disambiguation/disambiguate.ml index 85f05aa1c..cb4d85cfd 100644 --- a/helm/software/components/cic_disambiguation/disambiguate.ml +++ b/helm/software/components/cic_disambiguation/disambiguate.ml @@ -710,9 +710,15 @@ let domain_of_obj ~context ast = (* dom1 \ dom2 *) let domain_diff dom1 dom2 = (* let domain_diff = Domain.diff *) - let is_in_dom2 = - List.fold_left (fun pred elt -> (fun elt' -> elt' = elt || pred elt')) - (fun _ -> false) dom2 + let is_in_dom2 elt = + List.exists + (function + | Symbol (symb, 0) -> + (match elt with + Symbol (symb',_) when symb = symb' -> true + | _ -> false) + | item -> elt = item + ) dom2 in List.filter (fun (_,elt) -> not (is_in_dom2 elt)) dom1 @@ -833,7 +839,7 @@ let refine_profiler = HExtlib.profile "disambiguate_thing.refine_thing" | item -> item in Environment.find item e - with Not_found -> []) + with Not_found -> lookup_in_library ()) in choices in