From: Andrea Asperti Date: Thu, 5 Nov 2009 15:44:43 +0000 (+0000) Subject: A case was missing X-Git-Tag: make_still_working~3213 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=859157c4a7cf7f9945d1c04f595dfe9acd09f906;p=helm.git A case was missing --- diff --git a/helm/software/components/extlib/hExtlib.ml b/helm/software/components/extlib/hExtlib.ml index 13dd2f266..0536a1d6e 100644 --- a/helm/software/components/extlib/hExtlib.ml +++ b/helm/software/components/extlib/hExtlib.ml @@ -343,16 +343,18 @@ let rec rm_assoc n = function let merge canonicals elements n m = let cn,canonicals = rm_assoc n canonicals in let cm,canonicals = rm_assoc m canonicals in - let ln,elements = rm_assoc cn elements in - let lm,elements = rm_assoc cm elements in - let canonicals = - (n,cm)::(m,cm)::List.map - (fun ((x,xc) as p) -> - if xc = cn then (x,cm) else p) canonicals - in - let elements = (cm,ln@lm)::elements - in - canonicals,elements + if cn=cm then (n,cm)::(m,cm)::canonicals, elements + else + let ln,elements = rm_assoc cn elements in + let lm,elements = rm_assoc cm elements in + let canonicals = + (n,cm)::(m,cm)::List.map + (fun ((x,xc) as p) -> + if xc = cn then (x,cm) else p) canonicals + in + let elements = (cm,ln@lm)::elements + in + canonicals,elements ;; (* f x gives the direct dependencies of x;