Preface_make.BifunctorBuilding a Preface_specs.Bifunctor
Build a Preface_specs.BIFUNCTOR using Preface_specs.Bifunctor.WITH_BIMAP.
Standard method, using the minimal definition of an alt to derive its full API.
module Via_bimap
(Req : Preface_specs.Bifunctor.WITH_BIMAP) :
Preface_specs.BIFUNCTOR with type ('a, 'b) t = ('a, 'b) Req.tBuild a Preface_specs.BIFUNCTOR using Preface_specs.Bifunctor.WITH_MAP_FST_AND_MAP_SND.
Standard method, using the minimal definition of an alt to derive its full API.
module Via_map_fst_and_map_snd
(Req : Preface_specs.Bifunctor.WITH_MAP_FST_AND_MAP_SND) :
Preface_specs.BIFUNCTOR with type ('a, 'b) t = ('a, 'b) Req.tBuild a Preface_specs.BIFUNCTOR using the product of two Preface_specs.FUNCTOR.
Standard method, using the minimal definition of an alt to derive its full API.
module From_functors_product
(F : Preface_specs.FUNCTOR)
(G : Preface_specs.FUNCTOR) :
Preface_specs.BIFUNCTOR with type ('a, 'b) t = 'a F.t * 'b G.tBuild a Preface_specs.BIFUNCTOR using the sum of two Preface_specs.FUNCTOR using the technique described in Data types à la carte by W. Swierstra.
Standard method, using the minimal definition of an alt to derive its full API.
module From_functors_sum
(F : Preface_specs.FUNCTOR)
(G : Preface_specs.FUNCTOR) :
sig ... endConstruction of Preface_specs.BIFUNCTOR by combining them.
Construct the product of two Preface_specs.BIFUNCTOR.
module Product
(F : Preface_specs.BIFUNCTOR)
(G : Preface_specs.BIFUNCTOR) :
Preface_specs.BIFUNCTOR with type ('a, 'b) t = ('a, 'b) F.t * ('a, 'b) G.tSum of Preface_specs.BIFUNCTOR using the technique described in Data types à la carte by W. Swierstra.
module Sum
(F : Preface_specs.BIFUNCTOR)
(G : Preface_specs.BIFUNCTOR) :
sig ... endProduces a Preface_specs.BIFUNCTOR from a Preface_specs.FUNCTOR. (Using Clown)
module From_functor
(F : Preface_specs.Functor.CORE) :
Preface_specs.BIFUNCTOR with type ('a, 'b) t = 'a F.tAdvanced way to build an Preface_specs.BIFUNCTOR, constructing and assembling a component-by-component of Preface_specs.BIFUNCTOR. (In order to provide your own implementation for some features.)
module Via
(Core : Preface_specs.Bifunctor.CORE)
(Operation :
Preface_specs.Bifunctor.OPERATION with type ('a, 'b) t = ('a, 'b) Core.t) :
Preface_specs.BIFUNCTOR with type ('a, 'b) t = ('a, 'b) Core.tmodule Core_via_bimap
(Req : Preface_specs.Bifunctor.WITH_BIMAP) :
Preface_specs.Bifunctor.CORE with type ('a, 'b) t = ('a, 'b) Req.tmodule Core_via_map_fst_and_map_snd
(Req : Preface_specs.Bifunctor.WITH_MAP_FST_AND_MAP_SND) :
Preface_specs.Bifunctor.CORE with type ('a, 'b) t = ('a, 'b) Req.tmodule Operation
(Core : Preface_specs.Bifunctor.CORE) :
Preface_specs.Bifunctor.OPERATION with type ('a, 'b) t = ('a, 'b) Core.t