package monomorphic

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Stdlib.PervasivesSource

include module type of Pervasives
Sourceval raise : exn -> 'a
Sourceval raise_notrace : exn -> 'a
Sourceval invalid_arg : string -> 'a
Sourceval failwith : string -> 'a
Sourceexception Exit
Sourceval (=) : 'a -> 'a -> bool
Sourceval (<>) : 'a -> 'a -> bool
Sourceval (<) : 'a -> 'a -> bool
Sourceval (>) : 'a -> 'a -> bool
Sourceval (<=) : 'a -> 'a -> bool
Sourceval (>=) : 'a -> 'a -> bool
Sourceval (==) : 'a -> 'a -> bool
Sourceval (!=) : 'a -> 'a -> bool
Sourceval not : bool -> bool
Sourceval (&&) : bool -> bool -> bool
Sourceval (&) : bool -> bool -> bool
  • deprecated Use (&&) instead.
Sourceval (||) : bool -> bool -> bool
Sourceval (or) : bool -> bool -> bool
  • deprecated Use (||) instead.
Sourceval __LOC__ : string
Sourceval __FILE__ : string
Sourceval __LINE__ : int
Sourceval __MODULE__ : string
Sourceval __POS__ : string * int * int * int
Sourceval __LOC_OF__ : 'a -> string * 'a
Sourceval __LINE_OF__ : 'a -> int * 'a
Sourceval __POS_OF__ : 'a -> (string * int * int * int) * 'a
Sourceval (|>) : 'a -> ('a -> 'b) -> 'b
Sourceval (@@) : ('a -> 'b) -> 'a -> 'b
Sourceval (~-) : int -> int
Sourceval (~+) : int -> int
Sourceval (+) : int -> int -> int
Sourceval (-) : int -> int -> int
Sourceval (*) : int -> int -> int
Sourceval (/) : int -> int -> int
Sourceval (mod) : int -> int -> int
Sourceval (land) : int -> int -> int
Sourceval (lor) : int -> int -> int
Sourceval (lxor) : int -> int -> int
Sourceval lnot : int -> int
Sourceval (lsl) : int -> int -> int
Sourceval (lsr) : int -> int -> int
Sourceval (asr) : int -> int -> int
Sourceval (~-.) : float -> float
Sourceval (~+.) : float -> float
Sourceval (+.) : float -> float -> float
Sourceval (-.) : float -> float -> float
Sourceval (*.) : float -> float -> float
Sourceval (/.) : float -> float -> float
Sourceval (**) : float -> float -> float
Sourceval sqrt : float -> float
Sourceval exp : float -> float
Sourceval log : float -> float
Sourceval log10 : float -> float
Sourceval expm1 : float -> float
Sourceval log1p : float -> float
Sourceval cos : float -> float
Sourceval sin : float -> float
Sourceval tan : float -> float
Sourceval acos : float -> float
Sourceval asin : float -> float
Sourceval atan : float -> float
Sourceval atan2 : float -> float -> float
Sourceval hypot : float -> float -> float
Sourceval cosh : float -> float
Sourceval sinh : float -> float
Sourceval tanh : float -> float
Sourceval ceil : float -> float
Sourceval floor : float -> float
Sourceval abs_float : float -> float
Sourceval copysign : float -> float -> float
Sourceval mod_float : float -> float -> float
Sourceval frexp : float -> float * int
Sourceval ldexp : float -> int -> float
Sourceval modf : float -> float * float
Sourceval float : int -> float
Sourceval float_of_int : int -> float
Sourceval truncate : float -> int
Sourceval int_of_float : float -> int
Sourceval infinity : float
Sourceval neg_infinity : float
Sourceval nan : float
Sourceval max_float : float
Sourceval min_float : float
Sourceval epsilon_float : float
Sourcetype nonrec fpclass = fpclass =
  1. | FP_normal
  2. | FP_subnormal
  3. | FP_zero
  4. | FP_infinite
  5. | FP_nan
Sourceval classify_float : float -> fpclass
Sourceval (^) : string -> string -> string
Sourceval int_of_char : char -> int
Sourceval char_of_int : int -> char
Sourceval ignore : 'a -> unit
Sourceval string_of_bool : bool -> string
Sourceval bool_of_string : string -> bool
Sourceval bool_of_string_opt : string -> bool option
Sourceval string_of_int : int -> string
Sourceval int_of_string : string -> int
Sourceval int_of_string_opt : string -> int option
Sourceval string_of_float : float -> string
Sourceval float_of_string : string -> float
Sourceval float_of_string_opt : string -> float option
Sourceval fst : ('a * 'b) -> 'a
Sourceval snd : ('a * 'b) -> 'b
Sourceval (@) : 'a list -> 'a list -> 'a list
Sourcetype nonrec in_channel = in_channel
Sourcetype nonrec out_channel = out_channel
Sourceval stdin : in_channel
Sourceval stdout : out_channel
Sourceval stderr : out_channel
Sourceval print_char : char -> unit
Sourceval print_string : string -> unit
Sourceval print_bytes : bytes -> unit
Sourceval print_int : int -> unit
Sourceval print_float : float -> unit
Sourceval print_endline : string -> unit
Sourceval print_newline : unit -> unit
Sourceval prerr_char : char -> unit
Sourceval prerr_string : string -> unit
Sourceval prerr_bytes : bytes -> unit
Sourceval prerr_int : int -> unit
Sourceval prerr_float : float -> unit
Sourceval prerr_endline : string -> unit
Sourceval prerr_newline : unit -> unit
Sourceval read_line : unit -> string
Sourceval read_int : unit -> int
Sourceval read_int_opt : unit -> int option
Sourceval read_float : unit -> float
Sourceval read_float_opt : unit -> float option
Sourcetype nonrec 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
Sourceval open_out : string -> out_channel
Sourceval open_out_bin : string -> out_channel
Sourceval open_out_gen : open_flag list -> int -> string -> out_channel
Sourceval flush : out_channel -> unit
Sourceval flush_all : unit -> unit
Sourceval output_char : out_channel -> char -> unit
Sourceval output_string : out_channel -> string -> unit
Sourceval output_bytes : out_channel -> bytes -> unit
Sourceval output : out_channel -> bytes -> int -> int -> unit
Sourceval output_substring : out_channel -> string -> int -> int -> unit
Sourceval output_byte : out_channel -> int -> unit
Sourceval output_binary_int : out_channel -> int -> unit
Sourceval output_value : out_channel -> 'a -> unit
Sourceval seek_out : out_channel -> int -> unit
Sourceval pos_out : out_channel -> int
Sourceval out_channel_length : out_channel -> int
Sourceval close_out : out_channel -> unit
Sourceval close_out_noerr : out_channel -> unit
Sourceval set_binary_mode_out : out_channel -> bool -> unit
Sourceval open_in : string -> in_channel
Sourceval open_in_bin : string -> in_channel
Sourceval open_in_gen : open_flag list -> int -> string -> in_channel
Sourceval input_char : in_channel -> char
Sourceval input_line : in_channel -> string
Sourceval input : in_channel -> bytes -> int -> int -> int
Sourceval really_input : in_channel -> bytes -> int -> int -> unit
Sourceval really_input_string : in_channel -> int -> string
Sourceval input_byte : in_channel -> int
Sourceval input_binary_int : in_channel -> int
Sourceval input_value : in_channel -> 'a
Sourceval seek_in : in_channel -> int -> unit
Sourceval pos_in : in_channel -> int
Sourceval in_channel_length : in_channel -> int
Sourceval close_in : in_channel -> unit
Sourceval close_in_noerr : in_channel -> unit
Sourceval set_binary_mode_in : in_channel -> bool -> unit
Sourcemodule LargeFile = LargeFile
Sourcetype nonrec 'a ref = 'a ref = {
  1. mutable contents : 'a;
}
Sourceval ref : 'a -> 'a ref
Sourceval (!) : 'a ref -> 'a
Sourceval (:=) : 'a ref -> 'a -> unit
Sourceval incr : int ref -> unit
Sourceval decr : int ref -> unit
Sourcetype nonrec ('a, 'b) result = ('a, 'b) result =
  1. | Ok of 'a
  2. | Error of 'b
Sourcetype ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
Sourcetype ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
Sourcetype ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
Sourceval string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string
Sourceval format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6
Sourceval (^^) : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('f, 'b, 'c, 'e, 'g, 'h) format6 -> ('a, 'b, 'c, 'd, 'g, 'h) format6
Sourceval exit : int -> 'a
Sourceval at_exit : (unit -> unit) -> unit
Sourceval valid_float_lexem : string -> string
Sourceval do_at_exit : unit -> unit
include module type of Int

Integers

Sourcetype t = int

The type for integer values.

Sourceval zero : int

zero is the integer 0.

Sourceval one : int

one is the integer 1.

Sourceval minus_one : int

minus_one is the integer -1.

Sourceval neg : int -> int

neg x is ~-x.

Sourceval add : int -> int -> int

add x y is the addition x + y.

Sourceval sub : int -> int -> int

sub x y is the subtraction x - y.

Sourceval mul : int -> int -> int

mul x y is the multiplication x * y.

Sourceval div : int -> int -> int

div x y is the division x / y. See Stdlib.(/) for details.

Sourceval rem : int -> int -> int

rem x y is the remainder x mod y. See Stdlib.(mod) for details.

Sourceval succ : int -> int

succ x is add x 1.

Sourceval pred : int -> int

pred x is sub x 1.

Sourceval abs : int -> int

abs x is the absolute value of x. That is x if x is positive and neg x if x is negative. Warning. This may be negative if the argument is min_int.

Sourceval max_int : int

max_int is the greatest representable integer, 2{^[Sys.int_size - 1]} - 1.

Sourceval min_int : int

min_int is the smallest representable integer, -2{^[Sys.int_size - 1]}.

Sourceval logand : int -> int -> int

logand x y is the bitwise logical and of x and y.

Sourceval logor : int -> int -> int

logor x y is the bitwise logical or of x and y.

Sourceval logxor : int -> int -> int

logxor x y is the bitwise logical exclusive or of x and y.

Sourceval lognot : int -> int

lognot x is the bitwise logical negation of x.

Sourceval shift_left : int -> int -> int

shift_left x n shifts x to the left by n bits. The result is unspecified if n < 0 or n > Sys.int_size.

Sourceval shift_right : int -> int -> int

shift_right x n shifts x to the right by n bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if n < 0 or n > Sys.int_size.

Sourceval shift_right_logical : int -> int -> int

shift_right x n shifts x to the right by n bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if n < 0 or n > Sys.int_size.

Predicates and comparisons

Sourceval equal : int -> int -> bool

equal x y is true if and only if x = y.

Sourceval compare : int -> int -> int

compare x y is Stdlib.compare x y but more efficient.

Sourceval min : int -> int -> int

Return the smaller of the two arguments.

  • since 4.13.0
Sourceval max : int -> int -> int

Return the greater of the two arguments.

  • since 4.13.0

Converting

Sourceval to_float : int -> float

to_float x is x as a floating point number.

Sourceval of_float : float -> int

of_float x truncates x to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

Sourceval to_string : int -> string

to_string x is the written representation of x in decimal.

OCaml

Innovation. Community. Security.