1 (** This module extends the standard library of Objective Caml. *)
5 (** [new_line lexbuf] update lexbuf to increment its line
7 val new_line : Lexing.lexbuf -> unit
13 (** [inv_assoc l] inverses a bijective associative list [l]. *)
14 val inv_assoc : ('a * 'b) list -> ('b * 'a) list
18 (** [last l] returns the last element of a list.
19 Raise [EmptyList] if there is no such thing in [l]. *)
20 val last : 'a list -> 'a
22 (** [cut_last l] returns the last element of a list [l] and the
23 elements that come before it in [l].
24 Raise [EmptyList] if there is no such thing in [l]. *)
25 val cut_last : 'a list -> 'a * 'a list
27 (** [multi_set_of_list l] returns an associative list that
28 relates every element of [l] to its frequency in [l]. *)
29 val multi_set_of_list : 'a list -> ('a * int) list
31 (** [hashtbl_of_assoc l] converts an associative list into
33 val hashtbl_of_assoc : ('a * 'b) list -> ('a, 'b) Hashtbl.t
35 (** [assoc_diff l1 l2] returns the difference between two
37 val assoc_diff : ('a * 'b) list -> ('a * 'b) list
38 -> ('a * ('b option * 'b option)) list
40 (** [transitive_forall2 p l] checks that the binary predicate [p] is
41 true between each successive elements of [l]. If this is false,
42 the function returns the first pair of elements that falsify [p]. *)
43 val transitive_forall2 : ('a -> 'a -> bool) -> 'a list -> ('a * 'a) option
49 (** [extra_doc s] adds an extra line of documentation for an
51 val extra_doc : string -> (Arg.key * Arg.spec * Arg.doc)
57 (** [safe_remove filename] deletes a file named [filename],
58 but do not crash if a system error happens. (For instance,
59 if the file does not exist.) *)
60 val safe_remove : string -> unit
62 (** [alternative filename] finds an alternative name different
63 from [filename] that is not already used. *)
64 val alternative : string -> string
69 val fresh_file : string -> string -> string
71 val fresh_base : string -> string list -> string
73 val repeat : int -> ('a -> 'a) -> 'a -> 'a