@@ -920,3 +920,7 @@ let full_dot_path mpath tpath =
let safe_for_all2 f a b =
try List.for_all2 f a b with _ -> false
+
+let rec remove_duplicates f l = match l with
+ | [] -> []
+ | x :: l -> x :: (remove_duplicates f (List.filter (fun x' -> f x x') l))