let l = ref [] in
HMysql.iter rc (fun a -> match a.(0) with None ->()|Some a -> l := a:: !l);
let l = List.sort Pervasives.compare !l in
- MatitaMisc.list_uniq l
+ HExtlib.list_uniq l
with
exn -> raise exn (* no errors should be accepted *)
let baseuri = baseuri_of_file f in
obj_file_of_baseuri baseuri
-let rec list_uniq = function
- | [] -> []
- | h::[] -> [h]
- | h1::h2::tl when h1 = h2 -> list_uniq (h2 :: tl)
- | h1::tl (* when h1 <> h2 *) -> h1 :: list_uniq tl
-
let list_tl_at ?(equality=(==)) e l =
let rec aux =
function
val normalize_dir: string -> string (** add trailing "/" if missing *)
val strip_suffix: suffix:string -> string -> string
-val list_uniq: 'a list -> 'a list (* uniq unix filter on lists *)
-
(** @return tl tail of a list starting at a given element
* @param eq equality to be used, defaults to physical equality (==)
* @raise Not_found *)
l := uri :: !l
| _ -> ());
let l = List.sort Pervasives.compare !l in
- MatitaMisc.list_uniq l
+ HExtlib.list_uniq l
with
exn -> raise exn (* no errors should be accepted *)
end
let close_uri_list uri_to_remove =
(* to remove an uri you have to remove the whole script *)
let buri_to_remove =
- MatitaMisc.list_uniq
+ HExtlib.list_uniq
(List.fast_sort Pervasives.compare
(List.map safe_buri_of_suri uri_to_remove))
in
(fun acc u -> one_step_depend u @ acc) [] uri_to_remove
in
let depend =
- MatitaMisc.list_uniq
- (List.fast_sort Pervasives.compare depend)
+ HExtlib.list_uniq (List.fast_sort Pervasives.compare depend)
in
uri_to_remove, depend
if debug then
List.iter debug_prerr buris;
let l = close [] buris in
- let l = MatitaMisc.list_uniq (List.fast_sort Pervasives.compare l) in
+ let l = HExtlib.list_uniq (List.fast_sort Pervasives.compare l) in
let l = List.map UriManager.uri_of_string l in
debug_prerr "clean_baseuri will remove:";
if debug then
(fun file ->
let deps = Hashtbl.find_all include_deps file in
let deps = List.fast_sort Pervasives.compare deps in
- let deps = MatitaMisc.list_uniq deps in
+ let deps = HExtlib.list_uniq deps in
let deps = file :: deps in
let moo = MatitaMisc.obj_file_of_script file in
Printf.printf "%s: %s\n" moo (String.concat " " deps);