Preface_make.Functor
Building a Preface_specs.Functor
Build a Preface_specs.FUNCTOR
using Preface_specs.Functor.WITH_MAP
.
Standard method, using the minimal definition of a functor to derive its full API.
module Via_map
(Req : Preface_specs.Functor.WITH_MAP) :
Preface_specs.FUNCTOR with type 'a t = 'a Req.t
Construction of Preface_specs.FUNCTOR
by combining two other Preface_specs.FUNCTOR
.
Right-to-left composition of Preface_specs.FUNCTOR
.
module Composition
(F : Preface_specs.FUNCTOR)
(G : Preface_specs.FUNCTOR) :
Preface_specs.FUNCTOR with type 'a t = 'a G.t F.t
Construct the product of two Preface_specs.FUNCTOR
.
module Product
(F : Preface_specs.FUNCTOR)
(G : Preface_specs.FUNCTOR) :
Preface_specs.FUNCTOR with type 'a t = 'a F.t * 'a G.t
Sum of Preface_specs.FUNCTOR
using the technique described in Data types à la carte by W. Swierstra.
module Sum
(F : Preface_specs.FUNCTOR)
(G : Preface_specs.FUNCTOR) :
sig ... end
Specialize an Preface_specs.ARROW
into a Preface_specs.FUNCTOR
.
module From_arrow
(A : Preface_specs.ARROW) :
Preface_specs.FUNCTOR with type 'a t = (unit, 'a) A.t
Specialize an Preface_specs.APPLICATIVE
into a Preface_specs.FUNCTOR
.
module From_applicative
(Applicative : Preface_specs.APPLICATIVE) :
Preface_specs.FUNCTOR with type 'a t = 'a Applicative.t
Specialize an Preface_specs.ALT
into a Preface_specs.FUNCTOR
.
module From_alt
(Alt : Preface_specs.ALT) :
Preface_specs.FUNCTOR with type 'a t = 'a Alt.t
Specialize a Preface_specs.MONAD
into a Preface_specs.FUNCTOR
.
module From_monad
(Monad : Preface_specs.MONAD) :
Preface_specs.FUNCTOR with type 'a t = 'a Monad.t
Specialize an Preface_specs.ALTERNATIVE
into a Preface_specs.FUNCTOR
.
module From_alternative
(Alternative : Preface_specs.ALTERNATIVE) :
Preface_specs.FUNCTOR with type 'a t = 'a Alternative.t
Specialize a Preface_specs.MONAD_PLUS
into a Preface_specs.FUNCTOR
.
module From_monad_plus
(Monad_plus : Preface_specs.MONAD_PLUS) :
Preface_specs.FUNCTOR with type 'a t = 'a Monad_plus.t
Specialize a Preface_specs.COMONAD
into a Preface_specs.FUNCTOR
.
module From_comonad
(Comonad : Preface_specs.COMONAD) :
Preface_specs.FUNCTOR with type 'a t = 'a Comonad.t
Specialize a Preface_specs.BIFUNCTOR
into a Preface_specs.FUNCTOR
using Join.
module From_bifunctor
(Bifunctor : Preface_specs.Bifunctor.CORE) :
Preface_specs.FUNCTOR with type 'a t = ('a, 'a) Bifunctor.t
It is possible to Index a functor.
module Index
(F : Preface_specs.FUNCTOR) :
Preface_specs.INDEXED_FUNCTOR with type ('a, 'index) t = 'a F.t
Advanced way to build a Preface_specs.FUNCTOR
, constructing and assembling a component-by-component of Preface_specs.FUNCTOR
. (In order to provide your own implementation for some features.)
module Via
(Core : Preface_specs.Functor.CORE)
(Operation : Preface_specs.Functor.OPERATION with type 'a t = 'a Core.t)
(Infix : Preface_specs.Functor.INFIX with type 'a t = 'a Core.t)
(Syntax : Preface_specs.Functor.SYNTAX with type 'a t = 'a Core.t) :
Preface_specs.FUNCTOR with type 'a t = 'a Core.t
module Core
(Req : Preface_specs.Functor.WITH_MAP) :
Preface_specs.Functor.CORE with type 'a t = 'a Req.t
module Operation
(Core : Preface_specs.Functor.CORE) :
Preface_specs.Functor.OPERATION with type 'a t = 'a Core.t
module Infix
(Core : Preface_specs.Functor.CORE)
(Operation : Preface_specs.Functor.OPERATION with type 'a t = 'a Core.t) :
Preface_specs.Functor.INFIX with type 'a t = 'a Core.t
module Syntax
(Core : Preface_specs.Functor.CORE) :
Preface_specs.Functor.SYNTAX with type 'a t = 'a Core.t