package base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Shadow_stdlib end with type 'a ref := 'a Pervasives.ref with type ('a, 'b, 'c) format := ('a, 'b, 'c) Pervasives.format with type ('a, 'b, 'c, 'd) format4 := ('a, 'b, 'c, 'd) Pervasives.format4 with type ('a, 'b, 'c, 'd, 'e, 'f) format6 := ('a, 'b, 'c, 'd, 'e, 'f) Pervasives.format6 with module Pervasives := Pervasives with module Array := Caml.Array with module Buffer := Caml.Buffer with module Char := Caml.Char with module Hashtbl := Caml.Hashtbl with module Int32 := Caml.Int32 with module Int64 := Caml.Int64 with module Lazy := Caml.Lazy with module List := Caml.List with module Map := Caml.Map with module Nativeint := Caml.Nativeint with module Printf := Caml.Printf with module Random := Caml.Random with module Set := Caml.Set with module String := Caml.String with module Sys := Caml.Sys with module Uchar := Caml.Uchar
module Arg = Shadow_stdlib.Arg
module ArrayLabels = Shadow_stdlib.ArrayLabels
module Bytes = Shadow_stdlib.Bytes
module BytesLabels = Shadow_stdlib.BytesLabels
module Callback = Shadow_stdlib.Callback
module Complex = Shadow_stdlib.Complex
module Digest = Shadow_stdlib.Digest
module Ephemeron = Shadow_stdlib.Ephemeron
module Filename = Shadow_stdlib.Filename
module Format = Shadow_stdlib.Format
module Gc = Shadow_stdlib.Gc
module Genlex = Shadow_stdlib.Genlex
module Lexing = Shadow_stdlib.Lexing
module ListLabels = Shadow_stdlib.ListLabels
module Marshal = Shadow_stdlib.Marshal
module MoreLabels = Shadow_stdlib.MoreLabels
module Obj = Shadow_stdlib.Obj
module Oo = Shadow_stdlib.Oo
module Parsing = Shadow_stdlib.Parsing
module Printexc = Shadow_stdlib.Printexc
module Queue = Shadow_stdlib.Queue
module Scanf = Shadow_stdlib.Scanf
module Sort = Shadow_stdlib.Sort
module Spacetime = Shadow_stdlib.Spacetime
module Stack = Shadow_stdlib.Stack
module StdLabels = Shadow_stdlib.StdLabels
module Stream = Shadow_stdlib.Stream
module StringLabels = Shadow_stdlib.StringLabels
module Weak = Shadow_stdlib.Weak
val raise_notrace : exn -> 'a
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.raise_notrace] instead
exception Exit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Refering to the stdlib directly is discouraged by Base. You should either use the equivalent functionality offered by Base, or if you really want to refer to the stdlib, use Caml.Exit instead
val (==) : 'a -> 'a -> bool
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [phys_equal] instead.
val (&) : bool -> bool -> bool
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.( & )] instead
val or : bool -> bool -> bool
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.( or )] instead
val __LOC__ : string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.__LOC__] instead
val __FILE__ : string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.__FILE__] instead
val __LINE__ : int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.__LINE__] instead
val __MODULE__ : string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.__MODULE__] instead
val __POS__ : string * int * int * int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.__POS__] instead
val __LOC_OF__ : 'a -> string * 'a
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.__LOC_OF__] instead
val __LINE_OF__ : 'a -> int * 'a
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.__LINE_OF__] instead
val __POS_OF__ : 'a -> (string * int * int * int) * 'a
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.__POS_OF__] instead
val (@@) : ('a -> 'b) -> 'a -> 'b
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.( @@ )] instead
val (~+) : int -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.( ~+ )] instead
val pred : int -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.pred] instead
val (~+.) : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.( ~+. )] instead
val sqrt : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.sqrt] instead
val exp : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.exp] instead
val log : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.log] instead
val log10 : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.log10] instead
val expm1 : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.expm1] instead
val log1p : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.log1p] instead
val cos : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.cos] instead
val sin : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.sin] instead
val tan : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.tan] instead
val acos : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.acos] instead
val asin : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.asin] instead
val atan : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.atan] instead
val atan2 : float -> float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.atan2] instead
val hypot : float -> float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.hypot] instead
val cosh : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.cosh] instead
val sinh : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.sinh] instead
val tanh : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.tanh] instead
val ceil : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.ceil] instead
val floor : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.floor] instead
val abs_float : float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.abs_float] instead
val copysign : float -> float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.copysign] instead
val mod_float : float -> float -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.mod_float] instead
val frexp : float -> float * int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.frexp] instead
val ldexp : float -> int -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.ldexp] instead
val modf : float -> float * float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.modf] instead
val float : int -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.float] instead
val truncate : float -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.truncate] instead
val infinity : float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.infinity] instead
val neg_infinity : float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.neg_infinity] instead
val nan : float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.nan] instead
val max_float : float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.max_float] instead
val min_float : float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.min_float] instead
val epsilon_float : float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.epsilon_float] instead
type nonrec fpclass = Pervasives.fpclass =
  1. | FP_normal
  2. | FP_subnormal
  3. | FP_zero
  4. | FP_infinite
  5. | FP_nan
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Refering to the stdlib directly is discouraged by Base. You should either use the equivalent functionality offered by Base, or if you really want to refer to the stdlib, use Caml.fpclass instead
val classify_float : float -> fpclass
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.classify_float] instead
val int_of_char : char -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.int_of_char] instead
val char_of_int : int -> char
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.char_of_int] instead
val string_of_bool : bool -> string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.string_of_bool] instead
val bool_of_string : string -> bool
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.bool_of_string] instead
val int_of_string : string -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.int_of_string] instead
val string_of_float : float -> string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.string_of_float] instead
type nonrec in_channel = Pervasives.in_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.t] instead.
type nonrec out_channel = Pervasives.out_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.t] instead.
val stdin : in_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.stdin] instead.
val stdout : out_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.stdout] instead.
val stderr : out_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.stderr] instead.
val print_char : char -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_char Stdio.stdout] instead.
val print_string : string -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_string Stdio.stdout] instead.
val print_bytes : bytes -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.print_bytes] instead
val print_int : int -> unit
  • deprecated
val print_float : float -> unit
  • deprecated
val print_endline : string -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.print_endline] instead.
val print_newline : unit -> unit
  • deprecated
val prerr_char : char -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_char Stdio.stderr] instead.
val prerr_string : string -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_string Stdio.stderr] instead.
val prerr_bytes : bytes -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.prerr_bytes] instead
val prerr_int : int -> unit
  • deprecated
val prerr_float : float -> unit
  • deprecated
val prerr_endline : string -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.prerr_endline] instead.
val prerr_newline : unit -> unit
  • deprecated
val read_line : unit -> string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.input_line] instead.
val read_int : unit -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.read_int] instead
val read_float : unit -> float
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.read_float] instead
type nonrec open_flag = Pervasives.open_flag =
  1. | Open_rdonly
  2. | Open_wronly
  3. | Open_append
  4. | Open_creat
  5. | Open_trunc
  6. | Open_excl
  7. | Open_binary
  8. | Open_text
  9. | Open_nonblock
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Refering to the stdlib directly is discouraged by Base. You should either use the equivalent functionality offered by Base, or if you really want to refer to the stdlib, use Caml.open_flag instead
val open_out : string -> out_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.create] instead.
val open_out_bin : string -> out_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.create] instead.
val open_out_gen : open_flag list -> int -> string -> out_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.open_out_gen] instead
val flush : out_channel -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.flush] instead.
val flush_all : unit -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.flush_all] instead
val output_char : out_channel -> char -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_char] instead.
val output_string : out_channel -> string -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_string] instead.
val output_bytes : out_channel -> bytes -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.output_bytes] instead
val output : out_channel -> bytes -> int -> int -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output] instead.
val output_substring : out_channel -> string -> int -> int -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output] instead.
val output_byte : out_channel -> int -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_byte] instead.
val output_binary_int : out_channel -> int -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_binary_int] instead.
val output_value : out_channel -> 'a -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.output_value] instead.
val seek_out : out_channel -> int -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.seek] instead.
val pos_out : out_channel -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.pos] instead.
val out_channel_length : out_channel -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.length] instead.
val close_out : out_channel -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.close] instead.
val close_out_noerr : out_channel -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.close] instead.
val set_binary_mode_out : out_channel -> bool -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.Out_channel.set_binary_mode] instead.
val open_in : string -> in_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.create] instead.
val open_in_bin : string -> in_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.create] instead.
val open_in_gen : open_flag list -> int -> string -> in_channel
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.open_in_gen] instead
val input_char : in_channel -> char
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.input_char] instead.
val input_line : in_channel -> string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.input_line] instead.
val input : in_channel -> bytes -> int -> int -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.input] instead.
val really_input : in_channel -> bytes -> int -> int -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.really_input] instead.
val really_input_string : in_channel -> int -> string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is no equivalent functionality in Base or Stdio but you can use [Stdio.Out_channel] instead. Alternatively, if you really want to refer the stdlib function you can use [Caml.really_input_string].
val input_byte : in_channel -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.input_byte] instead.
val input_binary_int : in_channel -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.input_binary_int] instead.
val input_value : in_channel -> 'a
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.unsafe_input_value] instead.
val seek_in : in_channel -> int -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.seek] instead.
val pos_in : in_channel -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.pos] instead.
val in_channel_length : in_channel -> int
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.length] instead.
val close_in : in_channel -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.close] instead.
val close_in_noerr : in_channel -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.close] instead.
val set_binary_mode_in : in_channel -> bool -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Use [Stdio.In_channel.set_binary_mode] instead.
module LargeFile = Shadow_stdlib.LargeFile
type nonrec ('a, 'b) result = ('a, 'b) Pervasives.result =
  1. | Ok of 'a
  2. | Error of 'b
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. Refering to the stdlib directly is discouraged by Base. You should either use the equivalent functionality offered by Base, or if you really want to refer to the stdlib, use Caml.result instead
val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) Pervasives.format6 -> string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.string_of_format] instead
val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) Pervasives.format6 -> ('a, 'b, 'c, 'd, 'e, 'f) Pervasives.format6
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.format_of_string] instead
val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) Pervasives.format6 -> ('f, 'b, 'c, 'e, 'g, 'h) Pervasives.format6 -> ('a, 'b, 'c, 'd, 'g, 'h) Pervasives.format6
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.( ^^ )] instead
val at_exit : (unit -> unit) -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.at_exit] instead
val valid_float_lexem : string -> string
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.valid_float_lexem] instead
val unsafe_really_input : in_channel -> bytes -> int -> int -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.unsafe_really_input] instead
val do_at_exit : unit -> unit
  • deprecated [2016-09] this element comes from the stdlib distributed with OCaml. There is not equivalent functionality in Base or Stdio at the moment, so you need to use [Caml.do_at_exit] instead
type 'a ref = 'a Caml.ref = {
  1. mutable contents : 'a;
}
module Caml : sig ... end
val (|>) : 'a -> ('a -> 'b) -> 'b
val (&&) : bool -> bool -> bool
val (||) : bool -> bool -> bool
val not : bool -> bool
val (!=) : 'a -> 'a -> bool
val (*) : int -> int -> int
val (**) : float -> float -> float
val (*.) : float -> float -> float
val (+) : int -> int -> int
val (+.) : float -> float -> float
val (-) : int -> int -> int
val (-.) : float -> float -> float
val (/) : int -> int -> int
val (/.) : float -> float -> float
module Polymorphic_compare = Polymorphic_compare
module Poly = Poly
module Int_replace_polymorphic_compare : sig ... end
include module type of struct include Int_replace_polymorphic_compare end
val (<) : int -> int -> bool
val (<=) : int -> int -> bool
val (<>) : int -> int -> bool
val (>) : int -> int -> bool
val (>=) : int -> int -> bool
val ascending : int -> int -> int
val descending : int -> int -> int
val compare : int -> int -> int
val equal : int -> int -> bool
val max : int -> int -> int
val min : int -> int -> int
val (<.) : float -> float -> bool
val (<=.) : float -> float -> bool
val (=.) : float -> float -> bool
val (>.) : float -> float -> bool
val (>=.) : float -> float -> bool
val (:=) : 'a ref -> 'a -> unit
val (!) : 'a ref -> 'a
val ref : 'a -> 'a ref
val (@) : 'a list -> 'a list -> 'a list
val (^) : string -> string -> string
val (~-) : int -> int
val (~-.) : float -> float
val (asr) : int -> int -> int
val (land) : int -> int -> int
val lnot : int -> int
val (lor) : int -> int -> int
val (lsl) : int -> int -> int
val (lsr) : int -> int -> int
val (lxor) : int -> int -> int
val (mod) : int -> int -> int
val abs : int -> int
val decr : int Caml.ref -> unit
val exit : int -> 'a
val failwith : string -> 'a
val float_of_int : int -> float
val float_of_string : string -> float
val fst : ('a * 'b) -> 'a
val incr : int Caml.ref -> unit
val int_of_float : float -> int
val invalid_arg : string -> 'a
val max_int : int
val min_int : int
val raise : exn -> 'a
val snd : ('a * 'b) -> 'b
val succ : int -> int
val string_of_int : int -> string
val phys_equal : 'a -> 'a -> bool
val am_testing : bool
type sexp_bool = bool

Dummy definitions for "optional" options, lists, and for opaque types

type 'a sexp_option = 'a option
type 'a sexp_list = 'a list
type 'a sexp_array = 'a array
type 'a sexp_opaque = 'a
Conversion of OCaml-values to S-expressions
val default_string_of_float : (float -> string) Caml.ref

default_string_of_float reference to the default function used to convert floats to strings.

Initially set to fun n -> sprintf "%.20G" n.

val write_old_option_format : bool Caml.ref

write_old_option_format reference for the default option format used to write option values. If set to true, the old-style option format will be used, the new-style one otherwise.

Initially set to true.

val read_old_option_format : bool Caml.ref

read_old_option_format reference for the default option format used to read option values. Of_sexp_error will be raised with old-style option values if this reference is set to false. Reading new-style option values is always supported. Using a global reference instead of changing the converter calling conventions is the only way to avoid breaking old code with the standard macros.

Initially set to true.

val list_map : ('a -> 'b) -> 'a list -> 'b list

We re-export a tail recursive map function, because some modules override the standard library functions (e.g. StdLabels) which wrecks havoc with the camlp4 extension.

val sexp_of_unit : unit -> Sexp.t

sexp_of_unit () converts a value of type unit to an S-expression.

val sexp_of_bool : bool -> Sexp.t

sexp_of_bool b converts the value x of type bool to an S-expression.

val sexp_of_string : string -> Sexp.t

sexp_of_bool str converts the value str of type string to an S-expression.

val sexp_of_char : char -> Sexp.t

sexp_of_char c converts the value c of type char to an S-expression.

val sexp_of_int : int -> Sexp.t

sexp_of_int n converts the value n of type int to an S-expression.

val sexp_of_float : float -> Sexp.t

sexp_of_float n converts the value n of type float to an S-expression.

val sexp_of_int32 : int32 -> Sexp.t

sexp_of_int32 n converts the value n of type int32 to an S-expression.

val sexp_of_int64 : int64 -> Sexp.t

sexp_of_int64 n converts the value n of type int64 to an S-expression.

val sexp_of_nativeint : nativeint -> Sexp.t

sexp_of_nativeint n converts the value n of type nativeint to an S-expression.

val sexp_of_ref : ('a -> Sexp.t) -> 'a Caml.ref -> Sexp.t

sexp_of_ref conv r converts the value r of type 'a ref to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_lazy_t : ('a -> Sexp.t) -> 'a lazy_t -> Sexp.t

sexp_of_lazy_t conv l converts the value l of type 'a lazy_t to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_option : ('a -> Sexp.t) -> 'a option -> Sexp.t

sexp_of_option conv opt converts the value opt of type 'a option to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_pair : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a * 'b) -> Sexp.t

sexp_of_pair conv1 conv2 pair converts a pair to an S-expression. It uses its first argument to convert the first element of the pair, and its second argument to convert the second element of the pair.

val sexp_of_triple : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('c -> Sexp.t) -> ('a * 'b * 'c) -> Sexp.t

sexp_of_triple conv1 conv2 conv3 triple converts a triple to an S-expression using conv1, conv2, and conv3 to convert its elements.

val sexp_of_list : ('a -> Sexp.t) -> 'a list -> Sexp.t

sexp_of_list conv lst converts the value lst of type 'a list to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_array : ('a -> Sexp.t) -> 'a array -> Sexp.t

sexp_of_array conv ar converts the value ar of type 'a array to an S-expression. Uses conv to convert values of type 'a to an S-expression.

val sexp_of_hashtbl : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a, 'b) MoreLabels.Hashtbl.t -> Sexp.t

sexp_of_hashtbl conv_key conv_value htbl converts the value htbl of type ('a, 'b) Caml.Hashtbl.t to an S-expression. Uses conv_key to convert the hashtable keys of type 'a, and conv_value to convert hashtable values of type 'b to S-expressions.

val sexp_of_opaque : 'a -> Sexp.t

sexp_of_opaque x converts the value x of opaque type to an S-expression. This means the user need not provide converters, but the result cannot be interpreted.

val sexp_of_fun : ('a -> 'b) -> Sexp.t

sexp_of_fun f converts the value f of function type to a dummy S-expression. Functions cannot be serialized as S-expressions, but at least a placeholder can be generated for pretty-printing.

Conversion of S-expressions to OCaml-values
exception Of_sexp_error of exn * Sexp.t

Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

val record_check_extra_fields : bool Caml.ref

record_check_extra_fields checks for extra (= unknown) fields in record S-expressions.

val of_sexp_error : string -> Sexp.t -> 'a

of_sexp_error reason sexp

val of_sexp_error_exn : exn -> Sexp.t -> 'a

of_sexp_error exc sexp

val unit_of_sexp : Sexp.t -> unit

unit_of_sexp sexp converts S-expression sexp to a value of type unit.

val bool_of_sexp : Sexp.t -> bool

bool_of_sexp sexp converts S-expression sexp to a value of type bool.

val string_of_sexp : Sexp.t -> string

string_of_sexp sexp converts S-expression sexp to a value of type string.

val char_of_sexp : Sexp.t -> char

char_of_sexp sexp converts S-expression sexp to a value of type char.

val int_of_sexp : Sexp.t -> int

int_of_sexp sexp converts S-expression sexp to a value of type int.

val float_of_sexp : Sexp.t -> float

float_of_sexp sexp converts S-expression sexp to a value of type float.

val int32_of_sexp : Sexp.t -> int32

int32_of_sexp sexp converts S-expression sexp to a value of type int32.

val int64_of_sexp : Sexp.t -> int64

int64_of_sexp sexp converts S-expression sexp to a value of type int64.

val nativeint_of_sexp : Sexp.t -> nativeint

nativeint_of_sexp sexp converts S-expression sexp to a value of type nativeint.

val ref_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a Caml.ref

ref_of_sexp conv sexp converts S-expression sexp to a value of type 'a ref using conversion function conv, which converts an S-expression to a value of type 'a.

val lazy_t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a lazy_t

lazy_t_of_sexp conv sexp converts S-expression sexp to a value of type 'a lazy_t using conversion function conv, which converts an S-expression to a value of type 'a.

val option_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a option

option_of_sexp conv sexp converts S-expression sexp to a value of type 'a option using conversion function conv, which converts an S-expression to a value of type 'a.

val pair_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> 'a * 'b

pair_of_sexp conv1 conv2 sexp converts S-expression sexp to a pair of type 'a * 'b using conversion functions conv1 and conv2, which convert S-expressions to values of type 'a and 'b respectively.

val triple_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> (Sexp.t -> 'c) -> Sexp.t -> 'a * 'b * 'c

triple_of_sexp conv1 conv2 conv3 sexp converts S-expression sexp to a triple of type 'a * 'b * 'c using conversion functions conv1, conv2, and conv3, which convert S-expressions to values of type 'a, 'b, and 'c respectively.

val list_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a list

list_of_sexp conv sexp converts S-expression sexp to a value of type 'a list using conversion function conv, which converts an S-expression to a value of type 'a.

val array_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a array

array_of_sexp conv sexp converts S-expression sexp to a value of type 'a array using conversion function conv, which converts an S-expression to a value of type 'a.

val hashtbl_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> ('a, 'b) MoreLabels.Hashtbl.t

hashtbl_of_sexp conv_key conv_value sexp converts S-expression sexp to a value of type ('a, 'b) Caml.Hashtbl.t using conversion function conv_key, which converts an S-expression to hashtable key of type 'a, and function conv_value, which converts an S-expression to hashtable value of type 'b.

val opaque_of_sexp : Sexp.t -> 'a

opaque_of_sexp sexp

  • raises Of_sexp_error

    when attempting to convert an S-expression to an opaque value.

val fun_of_sexp : Sexp.t -> 'a

fun_of_sexp sexp

  • raises Of_sexp_error

    when attempting to convert an S-expression to a function.

Exception converters

val sexp_of_exn : exn -> Sexp.t

sexp_of_exn exc converts exception exc to an S-expression. If no suitable converter is found, the standard converter in Printexc will be used to generate an atomic S-expression.

val sexp_of_exn_opt : exn -> Sexp.t option

sexp_of_exn_opt exc converts exception exc to Some sexp. If no suitable converter is found, None is returned instead.

module Exn_converter : sig ... end
include module type of struct include Hash.Builtin end
val hash_fold_nativeint : nativeint Hash.folder
val hash_fold_int64 : int64 Hash.folder
val hash_fold_int32 : int32 Hash.folder
val hash_fold_char : char Hash.folder
val hash_fold_int : int Hash.folder
val hash_fold_bool : bool Hash.folder
val hash_fold_string : string Hash.folder
val hash_fold_float : float Hash.folder
val hash_fold_unit : unit Hash.folder
val hash_fold_option : 'a Hash.folder -> 'a option Hash.folder
val hash_fold_list : 'a Hash.folder -> 'a list Hash.folder
val hash_fold_lazy_t : 'a Hash.folder -> 'a lazy_t Hash.folder
val hash_fold_ref_frozen : 'a Hash.folder -> 'a Caml.ref Hash.folder

Hash support for array and ref is provided, but is potentially DANGEROUS, since it incorporates the current contents of the array/ref into the hash value. Because of this we add a _frozen suffix to the function name.

Hash support for string is also potentially DANGEROUS, but strings are mutated less often, so we don't append _frozen to it.

Also note that we don't support bytes.

val hash_fold_array_frozen : 'a Hash.folder -> 'a array Hash.folder
val compare_bool : bool -> bool -> int
val compare_char : char -> char -> int
val compare_float : float -> float -> int
val compare_int : int -> int -> int
val compare_int32 : int32 -> int32 -> int
val compare_int64 : int64 -> int64 -> int
val compare_nativeint : nativeint -> nativeint -> int
val compare_string : string -> string -> int
val compare_unit : unit -> unit -> int
val compare_array : ('a -> 'a -> int) -> 'a array -> 'a array -> int
val compare_list : ('a -> 'a -> int) -> 'a list -> 'a list -> int
val compare_option : ('a -> 'a -> int) -> 'a option -> 'a option -> int
val compare_ref : ('a -> 'a -> int) -> 'a Pervasives.ref -> 'a Pervasives.ref -> int
OCaml

Innovation. Community. Security.