package ppx_deriving

  1. Overview
  2. Docs

A module collecting all predefined OCaml types, exceptions and modules operating on them, so that ppx_deriving plugins operate in a well-defined environment.

Predefined types

module Predef : sig ... end

The Predef module is necessary in absence of a type nonrec construct.

type int = Predef._int
type char = Predef._char
type string = Predef._string
type float = Predef._float
type bool = Predef._bool
type unit = Predef._unit
type exn = Predef._exn
type 'a array = 'a Predef._array
type 'a list = 'a Predef._list
type 'a option = 'a Predef._option =
  1. | None
  2. | Some of 'a
type nativeint = Predef._nativeint
type int32 = Predef._int32
type int64 = Predef._int64
type 'a lazy_t = 'a Predef._lazy_t
type bytes = Predef._bytes

Predefined modules

Operations on predefined types

module Pervasives : module type of Pervasives with type fpclass = Pervasives.fpclass and type in_channel = Pervasives.in_channel and type out_channel = Pervasives.out_channel and type open_flag = Pervasives.open_flag and type 'a ref = 'a Pervasives.ref and type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Pervasives.format6 and type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) Pervasives.format4 and type ('a, 'b, 'c) format = ('a, 'b, 'c) Pervasives.format
include module type of Pervasives with type fpclass = Pervasives.fpclass and type in_channel = Pervasives.in_channel and type out_channel = Pervasives.out_channel and type open_flag = Pervasives.open_flag and type 'a ref = 'a Pervasives.ref and type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) Pervasives.format6 and type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'd) Pervasives.format4 and type ('a, 'b, 'c) format = ('a, 'b, 'c) Pervasives.format
val raise : exn -> 'a
val raise_notrace : exn -> 'a
val invalid_arg : string -> 'a
val failwith : string -> 'a
exception Exit
val (=) : 'a -> 'a -> bool
val (<>) : 'a -> 'a -> bool
val (<) : 'a -> 'a -> bool
val (>) : 'a -> 'a -> bool
val (<=) : 'a -> 'a -> bool
val (>=) : 'a -> 'a -> bool
val compare : 'a -> 'a -> int
val min : 'a -> 'a -> 'a
val max : 'a -> 'a -> 'a
val (==) : 'a -> 'a -> bool
val (!=) : 'a -> 'a -> bool
val not : bool -> bool
val (&&) : bool -> bool -> bool
val (&) : bool -> bool -> bool
  • deprecated Use (&&) instead.
val (||) : bool -> bool -> bool
val or : bool -> bool -> bool
  • deprecated Use (||) instead.
val __LOC__ : string
val __FILE__ : string
val __LINE__ : int
val __MODULE__ : string
val __POS__ : string * int * int * int
val __LOC_OF__ : 'a -> string * 'a
val __LINE_OF__ : 'a -> int * 'a
val __POS_OF__ : 'a -> (string * int * int * int) * 'a
val (|>) : 'a -> ('a -> 'b) -> 'b
val (@@) : ('a -> 'b) -> 'a -> 'b
val (~-) : int -> int
val (~+) : int -> int
val succ : int -> int
val pred : int -> int
val (+) : int -> int -> int
val (-) : int -> int -> int
val (*) : int -> int -> int
val (/) : int -> int -> int
val (mod) : int -> int -> int
val abs : int -> int
val max_int : int
val min_int : int
val (land) : int -> int -> int
val (lor) : int -> int -> int
val (lxor) : int -> int -> int
val lnot : int -> int
val (lsl) : int -> int -> int
val (lsr) : int -> int -> int
val (asr) : int -> int -> int
val (~-.) : float -> float
val (~+.) : float -> float
val (+.) : float -> float -> float
val (-.) : float -> float -> float
val (*.) : float -> float -> float
val (/.) : float -> float -> float
val (**) : float -> float -> float
val sqrt : float -> float
val exp : float -> float
val log : float -> float
val log10 : float -> float
val expm1 : float -> float
val log1p : float -> float
val cos : float -> float
val sin : float -> float
val tan : float -> float
val acos : float -> float
val asin : float -> float
val atan : float -> float
val atan2 : float -> float -> float
val hypot : float -> float -> float
val cosh : float -> float
val sinh : float -> float
val tanh : float -> float
val ceil : float -> float
val floor : float -> float
val abs_float : float -> float
val copysign : float -> float -> float
val mod_float : float -> float -> float
val frexp : float -> float * int
val ldexp : float -> int -> float
val modf : float -> float * float
val float : int -> float
val float_of_int : int -> float
val truncate : float -> int
val int_of_float : float -> int
val infinity : float
val neg_infinity : float
val nan : float
val max_float : float
val min_float : float
val epsilon_float : float
type fpclass = Pervasives.fpclass =
  1. | FP_normal
  2. | FP_subnormal
  3. | FP_zero
  4. | FP_infinite
  5. | FP_nan
val classify_float : float -> fpclass
val (^) : string -> string -> string
val int_of_char : char -> int
val char_of_int : int -> char
val ignore : 'a -> unit
val string_of_bool : bool -> string
val bool_of_string : string -> bool
val string_of_int : int -> string
val int_of_string : string -> int
val string_of_float : float -> string
val float_of_string : string -> float
val fst : ('a * 'b) -> 'a
val snd : ('a * 'b) -> 'b
val (@) : 'a list -> 'a list -> 'a list
type in_channel = Pervasives.in_channel
type out_channel = Pervasives.out_channel
val stdin : in_channel
val stdout : out_channel
val stderr : out_channel
val print_char : char -> unit
val print_string : string -> unit
val print_bytes : bytes -> 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_bytes : bytes -> 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
val read_float : unit -> float
type 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
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 flush_all : unit -> 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
module LargeFile : sig ... end
type !'a ref = 'a Pervasives.ref = {
  1. mutable contents : 'a;
}
val ref : 'a -> 'a ref
val (!) : 'a ref -> 'a
val (:=) : 'a ref -> 'a -> unit
val incr : int ref -> unit
val decr : int ref -> unit
type (!'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) Pervasives.format6
type (!'a, !'b, !'c, !'d) format4 = ('a, 'b, 'c, 'd) Pervasives.format4
type (!'a, !'b, !'c) format = ('a, 'b, 'c) Pervasives.format
val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string
val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6
val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('f, 'b, 'c, 'e, 'g, 'h) format6 -> ('a, 'b, 'c, 'd, 'g, 'h) format6
val exit : int -> 'a
val at_exit : (unit -> unit) -> unit
val valid_float_lexem : string -> string
val unsafe_really_input : in_channel -> bytes -> int -> int -> unit
val do_at_exit : unit -> unit
module Char : module type of Char
module String : module type of String
module Printexc : module type of Printexc with type raw_backtrace := Printexc.raw_backtrace and type backtrace_slot := Printexc.backtrace_slot and type location := Printexc.location
module Array : module type of Array
module List : module type of List
module Nativeint : module type of Nativeint
module Int32 : module type of Int32
module Int64 : module type of Int64
module Lazy : module type of Lazy
module Bytes : module type of Bytes

Data structures

module Hashtbl : module type of Hashtbl with type ('a, 'b) t := ('a, 'b) Hashtbl.t and type statistics := Hashtbl.statistics
module Queue : module type of Queue with type 'a t := 'a Queue.t
module Stack : module type of Stack with type 'a t := 'a Stack.t
module Set : module type of Set
module Map : module type of Map
module Weak : module type of Weak with type 'a t := 'a Weak.t
module Buffer : module type of Buffer with type t := Buffer.t
module Result : sig ... end

Formatting

module Printf : module type of Printf
module Format : module type of Format with type formatter_out_functions := Format.formatter_out_functions and type formatter_tag_functions := Format.formatter_tag_functions and type formatter := Format.formatter
OCaml

Innovation. Community. Security.