val mkdir: string -> unit (** create dir and parents. @raise Failure *)
val tilde_expand: string -> string (** bash-like (head) tilde expansion *)
val safe_remove: string -> unit (** removes a file if it exists *)
val safe_rmdir: string -> unit (** removes a dir if it exists and is empty *)
val is_dir_empty: string -> bool (** checks if the dir is empty *)
val rmdir_descend: string -> unit (** rmdir -p *)
val mkdir: string -> unit (** create dir and parents. @raise Failure *)
val tilde_expand: string -> string (** bash-like (head) tilde expansion *)
val safe_remove: string -> unit (** removes a file if it exists *)
val safe_rmdir: string -> unit (** removes a dir if it exists and is empty *)
val is_dir_empty: string -> bool (** checks if the dir is empty *)
val rmdir_descend: string -> unit (** rmdir -p *)
+ (** @param finalizer finalization function (execution both in case of success
+ * and in case of raised exception
+ * @param f function to be invoked
+ * @param arg argument to be passed to function *)
val list_uniq:
?eq:('a->'a->bool) -> 'a list -> 'a list (** uniq unix filter on lists *)
val filter_map: ('a -> 'b option) -> 'a list -> 'b list (** filter + map *)
val list_uniq:
?eq:('a->'a->bool) -> 'a list -> 'a list (** uniq unix filter on lists *)
val filter_map: ('a -> 'b option) -> 'a list -> 'b list (** filter + map *)
val list_concat: ?sep:'a list -> 'a list list -> 'a list (**String.concat-like*)
val list_findopt: ('a -> 'b option) -> 'a list -> 'b option
val list_concat: ?sep:'a list -> 'a list list -> 'a list (**String.concat-like*)
val list_findopt: ('a -> 'b option) -> 'a list -> 'b option
+val flatten_map: ('a -> 'b list) -> 'a list -> 'b list
+val list_last: 'a list -> 'a
+
+ (** split_nth n l
+ * @returns two list, the first contains at least n elements, the second the
+ * remaining one
+ * @raise Failure when List.length l < n *)
+val split_nth: int -> 'a list -> 'a list * 'a list
(** @return a profiling function; [s] is used for labelling the total time at
* the end of the execution *)
val profile : ?enable:bool -> string -> profiler
(** @return a profiling function; [s] is used for labelling the total time at
* the end of the execution *)
val profile : ?enable:bool -> string -> profiler
-exception Localized of Token.flocation * exn
+exception Localized of Stdpp.location * exn
+
+val loc_of_floc: Stdpp.location -> int * int
+val floc_of_loc: int * int -> Stdpp.location
+
+val dummy_floc: Stdpp.location