Dolmen_std.MiscSourceComposition of comparison functions.
Lexicogrphic comparison on lsits.
Hash combinators.
Returns the extension of a file, i.e the shortest suffix containing the character '.'. Returns an empty string if such a suffix does not exists.
Split on characters in a string (see Stdlib's split_on_char).
Returns a list with n times the given value. Returns an empty list if n
Map on option.
Bind on option.
Equivalent to String.for_all (which is only available on ocaml >= 4.10)
Print an option
val pp_list :
pp_sep:(Buffer.t -> 'a -> unit) ->
sep:'a ->
pp:(Buffer.t -> 'b -> unit) ->
Buffer.t ->
'b list ->
unitPrint a list with separator into a buffer
val print_opt :
?none:string ->
(Format.formatter -> 'a -> unit) ->
Format.formatter ->
'a option ->
unitPrint an option.
val print_list :
print_sep:(Format.formatter -> 'a -> unit) ->
sep:'a ->
print:(Format.formatter -> 'b -> unit) ->
Format.formatter ->
'b list ->
unitPrint a list with separator into a buffer
Applies the given function n times.
Same as
ist.concat_map
(which is not available on ocaml.4.08).
Filename string of an input.
val filename_of_input_source :
[ `Stdin | `File of string | `Raw of string * string ] ->
stringFilename string of an input source.
val mk_lexbuf :
[ `Stdin | `File of string | `Contents of string * string ] ->
Lexing.lexbuf * (unit -> unit)Returns the lexbuf associetd with the given file or stdin, with the correct filename, together with a function to close the associated file descriptor. The `Contents constructor expect first a name for the input stream (to report errors), and then a string with the actual contents to be parsed.