package higher

  1. Overview
  2. Docs

Operations on newtypes

type ('p, 'f) app

Type expression application.

module type Newtype0 = sig ... end

Construct a newtype for a type constructor with no parameters.

module Newtype0 (T : sig ... end) : Newtype0 with type s = T.t
module type Newtype1 = sig ... end

Construct a newtype for a type constructor with one parameter.

module Newtype1 (T : sig ... end) : Newtype1 with type 'a s = 'a T.t
module type Newtype2 = sig ... end

Construct a newtype for a type constructor with two parameters.

module Newtype2 (T : sig ... end) : Newtype2 with type ('a, 'b) s = ('a, 'b) T.t
module type Newtype3 = sig ... end

Construct a newtype for a type constructor with three parameters.

module Newtype3 (T : sig ... end) : Newtype3 with type ('a, 'b, 'c) s = ('a, 'b, 'c) T.t
module type Newtype4 = sig ... end

Construct a newtype for a type constructor with four parameters.

module Newtype4 (T : sig ... end) : Newtype4 with type ('a, 'b, 'c, 'd) s = ('a, 'b, 'c, 'd) T.t
module type Newtype5 = sig ... end

Construct a newtype for a type constructor with five parameters.

module Newtype5 (T : sig ... end) : Newtype5 with type ('a, 'b, 'c, 'd, 'e) s = ('a, 'b, 'c, 'd, 'e) T.t
module type Newtype6 = sig ... end

Construct a newtype for a type constructor with six parameters.

module Newtype6 (T : sig ... end) : Newtype6 with type ('a, 'b, 'c, 'd, 'e, 'f) s = ('a, 'b, 'c, 'd, 'e, 'f) T.t
OCaml

Innovation. Community. Security.