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
9 val lex_num : string -> int -> (int * int * int) option
15 (** [inv_assoc l] inverses a bijective associative list [l]. *)
16 val inv_assoc : ('a * 'b) list -> ('b * 'a) list
20 (** [last l] returns the last element of a list.
21 Raise [EmptyList] if there is no such thing in [l]. *)
22 val last : 'a list -> 'a
24 (** [cut_last l] returns the last element of a list [l] and the
25 elements that come before it in [l].
26 Raise [EmptyList] if there is no such thing in [l]. *)
27 val cut_last : 'a list -> 'a * 'a list
29 (** [multi_set_of_list l] returns an associative list that
30 relates every element of [l] to its frequency in [l]. *)
31 val multi_set_of_list : 'a list -> ('a * int) list
33 (** [hashtbl_of_assoc l] converts an associative list into
35 val hashtbl_of_assoc : ('a * 'b) list -> ('a, 'b) Hashtbl.t
37 (** [assoc_diff l1 l2] returns the difference between two
39 val assoc_diff : ('a * 'b) list -> ('a * 'b) list
40 -> ('a * ('b option * 'b option)) list
42 (** [transitive_forall2 p l] checks that the binary predicate [p] is
43 true between each successive elements of [l]. If this is false,
44 the function returns the first pair of elements that falsify [p]. *)
45 val transitive_forall2 : ('a -> 'a -> bool) -> 'a list -> ('a * 'a) option
47 (** [repeat init n f] computes [f 0; ...; f n] threading an
48 accumulator along the way from [n] to [0]. *)
49 val repeat : 'b -> int -> ('b -> int -> 'b * 'a) -> 'b * 'a list
55 (** [extra_doc s] adds an extra line of documentation for an
57 val extra_doc : string -> (Arg.key * Arg.spec * Arg.doc)
63 (** [safe_remove filename] deletes a file named [filename],
64 but do not crash if a system error happens. (For instance,
65 if the file does not exist.) *)
66 val safe_remove : string -> unit
68 (** [alternative filename] finds an alternative name different
69 from [filename] that is not already used. *)
70 val alternative : string -> string
76 (** Buffered printf-based IO. *)
77 val printf : ('a, Format.formatter, unit) Pervasives.format -> 'a
78 val eprintf : ('a, Format.formatter, unit) Pervasives.format -> 'a
79 val set_buffered_mode : unit -> unit
80 val get_buffers : unit -> string * string
87 (unit -> 'date) -> ('date -> 'date -> unit)
88 -> ('a -> 'b) -> ('a -> 'b)
90 val set_now : (unit -> float) -> unit
92 val set_profiling_flag : bool -> unit
94 val profile : string -> ('a -> 'b) -> 'a -> 'b