Module Std

Extensions to the standard library. Most files in the project should begin open Std.

New modules

module Return : sig ... end

Early returns

module Nonempty_list : sig ... end

A non-empty list type. This can be constructed with the usual list syntax when the compiler is inferring the type, e.g.

module Nothing : sig ... end
module Hash_set : sig ... end

Hash sets are implemented as a hashmap from 'a to unit

OCaml Stdlib with labeled functions

include module type of struct include Stdlib.StdLabels end
module Array = Stdlib.ArrayLabels
module Bytes = Stdlib.BytesLabels
include module type of struct include Stdlib.MoreLabels end

A few extensions to builtin modules

module Option : sig ... end
module List : sig ... end
module Set : sig ... end
module Map : sig ... end
module String : sig ... end
module Int : sig ... end
module Float : sig ... end
module Hashtbl : sig ... end
module Result : sig ... end
module Lazy : sig ... end

Pervasive free functions

val fst3 : ('a * 'b * 'c) -> 'a
val string_of_float : float -> string

Useful for @@deriving derivers

module Sexp_conv : sig ... end
module Compare : sig ... end