summaryrefslogtreecommitdiff
path: root/ocamltest/ocamltest_stdlib.mli
blob: e7833d10c88f0fd8e7e13d101867f64eb24d100f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
(**************************************************************************)
(*                                                                        *)
(*                                 OCaml                                  *)
(*                                                                        *)
(*             Sebastien Hinderer, projet Gallium, INRIA Paris            *)
(*                                                                        *)
(*   Copyright 2016 Institut National de Recherche en Informatique et     *)
(*     en Automatique.                                                    *)
(*                                                                        *)
(*   All rights reserved.  This file is distributed under the terms of    *)
(*   the GNU Lesser General Public License version 2.1, with the          *)
(*   special exception on linking described in the file LICENSE.          *)
(*                                                                        *)
(**************************************************************************)

(* A few extensions to OCaml's standard library *)

(* Pervasive *)

val input_line_opt : in_channel -> string option

module Char : sig
  include module type of Char
  val is_blank : char -> bool
end

module Filename  : sig
  include module type of Filename
  val path_sep : string
  val maybe_quote : string -> string
  val make_filename : string -> string -> string
  val make_path : string list -> string
  val mkexe : string -> string
end

module List : sig
  include module type of List
  val concatmap : ('a -> 'b list) -> 'a list -> 'b list
end

module String : sig
  include module type of String
  val words : string -> string list
end

module Sys : sig
  include module type of Sys
  val file_is_empty : string -> bool
  val run_system_command : string -> unit
  val make_directory : string -> unit
  val string_of_file : string -> string
  val copy_file : string -> string -> unit
  val with_chdir : string -> (unit -> 'a) -> 'a
end

module StringSet : sig
  include Set.S with type elt = string
  val string_of_stringset : t -> string
end

module StringMap : Map.S with type key = string