package stdcompat

  1. Overview
  2. Docs
module Pervasives : sig ... end
exception Exit
type fpclass = fpclass =
  1. | FP_normal
  2. | FP_subnormal
  3. | FP_zero
  4. | FP_infinite
  5. | FP_nan
type in_channel = in_channel
type out_channel = out_channel
type open_flag = 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
module LargeFile = LargeFile
type 'a ref = 'a ref = {
  1. mutable contents : 'a;
}
type ('a, 'b) result = ('a, 'b) result =
  1. | Ok of 'a
  2. | Error of 'b
type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
val stdin : in_channel
val stdout : out_channel
val stderr : out_channel
val open_out : string -> out_channel
val open_out_bin : string -> out_channel
val open_out_gen : open_flag list -> int -> string -> out_channel
val flush : out_channel -> unit
val output_char : out_channel -> char -> unit
val output_string : out_channel -> string -> unit
val output_bytes : out_channel -> bytes -> unit
val output : out_channel -> bytes -> int -> int -> unit
val output_substring : out_channel -> string -> int -> int -> unit
val output_byte : out_channel -> int -> unit
val output_binary_int : out_channel -> int -> unit
val output_value : out_channel -> 'a -> unit
val seek_out : out_channel -> int -> unit
val pos_out : out_channel -> int
val out_channel_length : out_channel -> int
val close_out : out_channel -> unit
val close_out_noerr : out_channel -> unit
val set_binary_mode_out : out_channel -> bool -> unit
val open_in : string -> in_channel
val open_in_bin : string -> in_channel
val open_in_gen : open_flag list -> int -> string -> in_channel
val input_char : in_channel -> char
val input_line : in_channel -> string
val input : in_channel -> bytes -> int -> int -> int
val really_input : in_channel -> bytes -> int -> int -> unit
val really_input_string : in_channel -> int -> string
val input_byte : in_channel -> int
val input_binary_int : in_channel -> int
val input_value : in_channel -> 'a
val seek_in : in_channel -> int -> unit
val pos_in : in_channel -> int
val in_channel_length : in_channel -> int
val close_in : in_channel -> unit
val close_in_noerr : in_channel -> unit
val set_binary_mode_in : in_channel -> bool -> unit
val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string
val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('f, 'b, 'c, 'e, 'g, 'h) format6 -> ('a, 'b, 'c, 'd, 'g, 'h) format6
val bool_of_string_opt : string -> bool option
val int_of_string_opt : string -> int option
val float_of_string_opt : string -> float option
val read_int_opt : unit -> int option
val read_float_opt : unit -> float option
val raise_notrace : exn -> 'a
  • since 4.02.0: external raise_notrace : exn -> 'a = "%raise_notrace"
val __LOC__ : string
  • since 4.02.0: external __LOC__ : string = "%loc_LOC"
val __FILE__ : string
  • since 4.02.0: external __FILE__ : string = "%loc_FILE"
val __LINE__ : int
  • since 4.02.0: external __LINE__ : int = "%loc_LINE"
val __MODULE__ : string
  • since 4.02.0: external __MODULE__ : string = "%loc_MODULE"
val __POS__ : string * int * int * int
  • since 4.02.0: external __POS__ : (string * int * int * int) = "%loc_POS"
val __LOC_OF__ : 'a -> string * 'a
  • since 4.02.0: external __LOC_OF__ : 'a -> (string * 'a) = "%loc_LOC"
val __LINE_OF__ : 'a -> int * 'a
  • since 4.02.0: external __LINE_OF__ : 'a -> (int * 'a) = "%loc_LINE"
val __POS_OF__ : 'a -> (string * int * int * int) * 'a
  • since 4.02.0:

external __POS_OF__ : 'a -> ((string * int * int * int) * 'a) = "%loc_POS"

val print_bytes : bytes -> unit
  • since 4.02.0: val print_bytes : bytes -> unit
val prerr_bytes : bytes -> unit
  • since 4.02.0: val prerr_bytes : bytes -> unit
val (|>) : 'a -> ('a -> 'b) -> 'b
  • since 4.01.0: external (|>) : 'a -> ('a -> 'b) -> 'b = "%revapply"
val (@@) : ('a -> 'b) -> 'a -> 'b
  • since 4.01.0: external (@@) : ('a -> 'b) -> 'a -> 'b = "%apply"
val hypot : float -> float -> float
  • since 4.03.0:

external hypot : float -> float -> float = "caml_hypot_float" "caml_hypot"@@unboxed @@noalloc

  • since 4.00.0:

external hypot : float -> float -> float = "caml_hypot_float" "caml_hypot" "float"

val copysign : float -> float -> float
  • since 4.03.0:

external copysign : float -> float -> float = "caml_copysign_float" "caml_copysign" @@unboxed @@noalloc

  • since 4.00.0:

external copysign : float -> float -> float = "caml_copysign_float" "caml_copysign" "float"

val (~+) : int -> int
  • since 3.12.0: external (~+) : int -> int = "%identity"
val (~+.) : float -> float
  • since 3.12.0: external (~+.) : float -> float = "%identity"
val expm1 : float -> float
  • since 4.03.0:

external expm1 : float -> float = "caml_expm1_float" "caml_expm1" @@unboxed @@noalloc

  • since 3.12.0:

external expm1 : float -> float = "caml_expm1_float" "caml_expm1" "float"

val log1p : float -> float
  • since 4.03.0:

external log1p : float -> float = "caml_log1p_float" "caml_log1p" @@unboxed @@noalloc

  • since 3.12.0:

external log1p : float -> float = "caml_log1p_float" "caml_log1p" "float"

val raise : exn -> 'a

Alias for Stdlib.raise

val invalid_arg : string -> 'a
val failwith : string -> 'a

Alias for Stdlib.failwith

val (=) : 'a -> 'a -> bool

Alias for Stdlib.=

val (<>) : 'a -> 'a -> bool

Alias for Stdlib.<>

val (<) : 'a -> 'a -> bool

Alias for Stdlib.<

val (>) : 'a -> 'a -> bool

Alias for Stdlib.>

val (<=) : 'a -> 'a -> bool

Alias for Stdlib.<=

val (>=) : 'a -> 'a -> bool

Alias for Stdlib.>=

val compare : 'a -> 'a -> int

Alias for Stdlib.compare

val min : 'a -> 'a -> 'a

Alias for Stdlib.min

val max : 'a -> 'a -> 'a

Alias for Stdlib.max

val (==) : 'a -> 'a -> bool

Alias for Stdlib.==

val (!=) : 'a -> 'a -> bool

Alias for Stdlib.!=

val not : bool -> bool

Alias for Stdlib.not

val (&&) : bool -> bool -> bool

Alias for Stdlib.&&

  • since 4.02.0:

external (&) : bool -> bool -> bool = "%sequand"@@ocaml.deprecated "Use (&&) instead."

  • since 3.07.0: external (&) : bool -> bool -> bool = "%sequand"
val (||) : bool -> bool -> bool

Alias for Stdlib.||

  • since 4.02.0:

external (or) : bool -> bool -> bool = "%sequor"@@ocaml.deprecated "Use (||) instead."

  • since 3.07.0: external (or) : bool -> bool -> bool = "%sequor"
val (~-) : int -> int

Alias for Stdlib.~-

val succ : int -> int

Alias for Stdlib.succ

val pred : int -> int

Alias for Stdlib.pred

val (+) : int -> int -> int

Alias for Stdlib.+

val (-) : int -> int -> int

Alias for Stdlib.-

val (*) : int -> int -> int

Alias for Stdlib.*

val (/) : int -> int -> int

Alias for Stdlib./

val (mod) : int -> int -> int

Alias for Stdlib.mod

val abs : int -> int

Alias for Stdlib.abs

val max_int : int

Alias for Stdlib.max_int

val min_int : int

Alias for Stdlib.min_int

val (land) : int -> int -> int

Alias for Stdlib.land

val (lor) : int -> int -> int

Alias for Stdlib.lor

val (lxor) : int -> int -> int

Alias for Stdlib.lxor

val lnot : int -> int

Alias for Stdlib.lnot

val (lsl) : int -> int -> int

Alias for Stdlib.lsl

val (lsr) : int -> int -> int

Alias for Stdlib.lsr

val (asr) : int -> int -> int

Alias for Stdlib.asr

val (~-.) : float -> float

Alias for Stdlib.~-.

val (+.) : float -> float -> float

Alias for Stdlib.+.

val (-.) : float -> float -> float

Alias for Stdlib.-.

val (*.) : float -> float -> float

Alias for Stdlib.*.

val (/.) : float -> float -> float

Alias for Stdlib./.

val (**) : float -> float -> float
  • since 4.03.0:

external ( ** ) : float -> float -> float = "caml_power_float" "pow" @@unboxed @@noalloc

  • since 3.08.0:

external ( ** ) : float -> float -> float = "caml_power_float" "pow" "float"

  • since 3.07.0:

external ( ** ) : float -> float -> float = "power_float" "pow" "float"

val sqrt : float -> float
  • since 4.03.0:

external sqrt : float -> float = "caml_sqrt_float" "sqrt"@@unboxed @@noalloc

  • since 3.08.0:

external sqrt : float -> float = "caml_sqrt_float" "sqrt" "float"

  • since 3.07.0: external sqrt : float -> float = "sqrt_float" "sqrt" "float"
val exp : float -> float
  • since 4.03.0:

external exp : float -> float = "caml_exp_float" "exp"@@unboxed @@noalloc

  • since 3.08.0: external exp : float -> float = "caml_exp_float" "exp" "float"
  • since 3.07.0: external exp : float -> float = "exp_float" "exp" "float"
val log : float -> float
  • since 4.03.0:

external log : float -> float = "caml_log_float" "log"@@unboxed @@noalloc

  • since 3.08.0: external log : float -> float = "caml_log_float" "log" "float"
  • since 3.07.0: external log : float -> float = "log_float" "log" "float"
val log10 : float -> float
  • since 4.03.0:

external log10 : float -> float = "caml_log10_float" "log10"@@unboxed @@noalloc

  • since 3.08.0:

external log10 : float -> float = "caml_log10_float" "log10" "float"

  • since 3.07.0:

external log10 : float -> float = "log10_float" "log10" "float"

val cos : float -> float
  • since 4.03.0:

external cos : float -> float = "caml_cos_float" "cos"@@unboxed @@noalloc

  • since 3.08.0: external cos : float -> float = "caml_cos_float" "cos" "float"
  • since 3.07.0: external cos : float -> float = "cos_float" "cos" "float"
val sin : float -> float
  • since 4.03.0:

external sin : float -> float = "caml_sin_float" "sin"@@unboxed @@noalloc

  • since 3.08.0: external sin : float -> float = "caml_sin_float" "sin" "float"
  • since 3.07.0: external sin : float -> float = "sin_float" "sin" "float"
val tan : float -> float
  • since 4.03.0:

external tan : float -> float = "caml_tan_float" "tan"@@unboxed @@noalloc

  • since 3.08.0: external tan : float -> float = "caml_tan_float" "tan" "float"
  • since 3.07.0: external tan : float -> float = "tan_float" "tan" "float"
val acos : float -> float
  • since 4.03.0:

external acos : float -> float = "caml_acos_float" "acos"@@unboxed @@noalloc

  • since 3.08.0:

external acos : float -> float = "caml_acos_float" "acos" "float"

  • since 3.07.0: external acos : float -> float = "acos_float" "acos" "float"
val asin : float -> float
  • since 4.03.0:

external asin : float -> float = "caml_asin_float" "asin"@@unboxed @@noalloc

  • since 3.08.0:

external asin : float -> float = "caml_asin_float" "asin" "float"

  • since 3.07.0: external asin : float -> float = "asin_float" "asin" "float"
val atan : float -> float
  • since 4.03.0:

external atan : float -> float = "caml_atan_float" "atan"@@unboxed @@noalloc

  • since 3.08.0:

external atan : float -> float = "caml_atan_float" "atan" "float"

  • since 3.07.0: external atan : float -> float = "atan_float" "atan" "float"
val atan2 : float -> float -> float
  • since 4.03.0:

external atan2 : float -> float -> float = "caml_atan2_float" "atan2" @@unboxed @@noalloc

  • since 3.08.0:

external atan2 : float -> float -> float = "caml_atan2_float" "atan2" "float"

  • since 3.07.0:

external atan2 : float -> float -> float = "atan2_float" "atan2" "float"

val cosh : float -> float
  • since 4.03.0:

external cosh : float -> float = "caml_cosh_float" "cosh"@@unboxed @@noalloc

  • since 3.08.0:

external cosh : float -> float = "caml_cosh_float" "cosh" "float"

  • since 3.07.0: external cosh : float -> float = "cosh_float" "cosh" "float"
val sinh : float -> float
  • since 4.03.0:

external sinh : float -> float = "caml_sinh_float" "sinh"@@unboxed @@noalloc

  • since 3.08.0:

external sinh : float -> float = "caml_sinh_float" "sinh" "float"

  • since 3.07.0: external sinh : float -> float = "sinh_float" "sinh" "float"
val tanh : float -> float
  • since 4.03.0:

external tanh : float -> float = "caml_tanh_float" "tanh"@@unboxed @@noalloc

  • since 3.08.0:

external tanh : float -> float = "caml_tanh_float" "tanh" "float"

  • since 3.07.0: external tanh : float -> float = "tanh_float" "tanh" "float"
val ceil : float -> float
  • since 4.03.0:

external ceil : float -> float = "caml_ceil_float" "ceil"@@unboxed @@noalloc

  • since 3.08.0:

external ceil : float -> float = "caml_ceil_float" "ceil" "float"

  • since 3.07.0: external ceil : float -> float = "ceil_float" "ceil" "float"
val floor : float -> float
  • since 4.03.0:

external floor : float -> float = "caml_floor_float" "floor"@@unboxed @@noalloc

  • since 3.08.0:

external floor : float -> float = "caml_floor_float" "floor" "float"

  • since 3.07.0:

external floor : float -> float = "floor_float" "floor" "float"

val abs_float : float -> float
val mod_float : float -> float -> float
  • since 4.03.0:

external mod_float : float -> float -> float = "caml_fmod_float" "fmod" @@unboxed @@noalloc

  • since 3.08.0:

external mod_float : float -> float -> float = "caml_fmod_float" "fmod" "float"

  • since 3.07.0:

external mod_float : float -> float -> float = "fmod_float" "fmod" "float"

val frexp : float -> float * int
  • since 3.08.0:

external frexp : float -> (float * int) = "caml_frexp_float"

  • since 3.07.0: external frexp : float -> (float * int) = "frexp_float"
val ldexp : float -> int -> float
  • since 4.03.0:

external ldexp : ((float)@unboxed ) -> ((int)@untagged ) -> ((float)@unboxed ) = "caml_ldexp_float" "caml_ldexp_float_unboxed"@@noalloc

  • since 3.08.0: external ldexp : float -> int -> float = "caml_ldexp_float"
  • since 3.07.0: external ldexp : float -> int -> float = "ldexp_float"
val modf : float -> float * float
  • since 3.08.0:

external modf : float -> (float * float) = "caml_modf_float"

  • since 3.07.0: external modf : float -> (float * float) = "modf_float"
val float : int -> float

Alias for Stdlib.float

val float_of_int : int -> float
val truncate : float -> int

Alias for Stdlib.truncate

val int_of_float : float -> int
val infinity : float

Alias for Stdlib.infinity

val neg_infinity : float
val nan : float

Alias for Stdlib.nan

val max_float : float
val min_float : float
val epsilon_float : float
val classify_float : float -> fpclass
  • since 4.03.0:

external classify_float : ((float)@unboxed ) -> fpclass = "caml_classify_float" "caml_classify_float_unboxed"@@noalloc

  • since 3.08.0:

external classify_float : float -> fpclass = "caml_classify_float"

  • since 3.07.0: external classify_float : float -> fpclass = "classify_float"
val (^) : string -> string -> string

Alias for Stdlib.^

val int_of_char : char -> int
val char_of_int : int -> char
val ignore : 'a -> unit

Alias for Stdlib.ignore

val string_of_bool : bool -> string
val bool_of_string : string -> bool
val string_of_int : int -> string
val int_of_string : string -> int
  • since 3.08.0:

external int_of_string : string -> int = "caml_int_of_string"

  • since 3.07.0: external int_of_string : string -> int = "int_of_string"
val string_of_float : float -> string
val float_of_string : string -> float
  • since 3.08.0:

external float_of_string : string -> float = "caml_float_of_string"

  • since 3.07.0: external float_of_string : string -> float = "float_of_string"
val fst : ('a * 'b) -> 'a

Alias for Stdlib.fst

val snd : ('a * 'b) -> 'b

Alias for Stdlib.snd

val (@) : 'a list -> 'a list -> 'a list

Alias for Stdlib.@

val print_char : char -> unit
val print_string : string -> unit
val print_int : int -> unit
val print_float : float -> unit
val print_endline : string -> unit
val print_newline : unit -> unit
val prerr_char : char -> unit
val prerr_string : string -> unit
val prerr_int : int -> unit
val prerr_float : float -> unit
val prerr_endline : string -> unit
val prerr_newline : unit -> unit
val read_line : unit -> string
val read_int : unit -> int

Alias for Stdlib.read_int

val read_float : unit -> float
val flush_all : unit -> unit
val ref : 'a -> 'a ref

Alias for Stdlib.ref

val (!) : 'a ref -> 'a

Alias for Stdlib.!

val (:=) : 'a ref -> 'a -> unit

Alias for Stdlib.:=

val incr : int ref -> unit

Alias for Stdlib.incr

val decr : int ref -> unit

Alias for Stdlib.decr

val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6
  • since 3.10.0:

external format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6 = "%identity"

  • since 3.07.0:

external format_of_string : ('a, 'b, 'c, 'd) format4 -> ('a, 'b, 'c, 'd) format4 = "%identity"

val exit : int -> 'a

Alias for Stdlib.exit

val at_exit : (unit -> unit) -> unit

Alias for Stdlib.at_exit

val valid_float_lexem : string -> string
val do_at_exit : unit -> unit

Alias for Stdlib>.do_at_exit

val acosh : float -> float
val asinh : float -> float
val atanh : float -> float
module Arg : sig ... end
module Array : sig ... end
module ArrayLabels : sig ... end
module Atomic : sig ... end
module Bigarray = Bigarray
module Bool : sig ... end
module Buffer : sig ... end
module Bytes : sig ... end
module BytesLabels : sig ... end
module Callback : module type of struct include Callback end

Registering OCaml values with the C runtime.

module Char : sig ... end
module Complex : module type of struct include Complex end

Complex numbers.

module Digest : sig ... end
module Either : sig ... end
module Ephemeron : sig ... end
module Filename : sig ... end
module Float : sig ... end
module Format : sig ... end
module Fun : sig ... end
module Gc : module type of struct include Gc end

Memory management control and statistics; finalised values.

module Hashtbl : sig ... end
module In_channel : sig ... end
module Out_channel : sig ... end
module Int : sig ... end
module Int32 : sig ... end
module Int64 : sig ... end
module Lazy : sig ... end
module Lexing : sig ... end
module List : sig ... end
module ListLabels : sig ... end
module Map : sig ... end
module Nativeint : sig ... end
module Obj : module type of struct include Obj end

Operations on internal representations of values.

module Oo : module type of struct include Oo end

Operations on objects

module Option : sig ... end
module Parsing : module type of struct include Parsing end

The run-time library for parsers generated by ocamlyacc.

module Printexc : sig ... end
module Printf : sig ... end
module Queue : sig ... end
module Random : sig ... end
module Result : sig ... end
module Scanf : module type of struct include Scanf end

Formatted input functions.

module Seq : sig ... end
module Set : sig ... end
module Stack : sig ... end
module StdLabels : sig ... end
module String : sig ... end
module StringLabels : sig ... end
module Sys : sig ... end
module Uchar : sig ... end
module Unit : sig ... end
module Weak : sig ... end
OCaml

Innovation. Community. Security.