Preface_make.AlternativeBuilding a Preface_specs.Alternative
Build a Preface_specs.ALTERNATIVE using Preface_specs.Alternative.WITH_APPLY.
Standard method, using the minimal definition of an alt to derive its full API.
module Via_pure_and_apply
(Req : Preface_specs.Alternative.WITH_PURE_AND_APPLY) :
Preface_specs.ALTERNATIVE with type 'a t = 'a Req.tBuild a Preface_specs.ALTERNATIVE using Preface_specs.Alternative.WITH_MAP_AND_PRODUCT.
Other standard method, using the minimal definition of an alt to derive its full API.
module Via_pure_map_and_product
(Req : Preface_specs.Alternative.WITH_PURE_MAP_AND_PRODUCT) :
Preface_specs.ALTERNATIVE with type 'a t = 'a Req.tBuild a Preface_specs.ALTERNATIVE using Preface_specs.Alternative.WITH_LIFT2.
Other standard method, using the minimal definition of an alt to derive its full API.
module Via_pure_and_lift2
(Req : Preface_specs.Alternative.WITH_PURE_AND_LIFT2) :
Preface_specs.ALTERNATIVE with type 'a t = 'a Req.tBuild a Preface_specs.ALTERNATIVE over an Preface_specs.APPLICATIVE.
If you already have an Applicative, you can enrich it by passing only combine and neutral..
module Over_applicative
(Applicative : Preface_specs.APPLICATIVE)
(Req :
Preface_specs.Alternative.WITH_NEUTRAL_AND_COMBINE
with type 'a t = 'a Applicative.t) :
Preface_specs.ALTERNATIVE with type 'a t = 'a Req.tConstruction of Preface_specs.ALTERNATIVE by combining them.
Right-to-left composition of Preface_specs.ALTERNATIVE with Preface_specs.APPLICATIVE.
module Composition
(F : Preface_specs.ALTERNATIVE)
(G : Preface_specs.APPLICATIVE) :
Preface_specs.ALTERNATIVE with type 'a t = 'a G.t F.tConstruct the product of two Preface_specs.ALTERNATIVE.
module Product
(F : Preface_specs.ALTERNATIVE)
(G : Preface_specs.ALTERNATIVE) :
Preface_specs.ALTERNATIVE with type 'a t = 'a F.t * 'a G.tProduces an Preface_specs.ALTERNATIVE from an Preface_specs.ARROW_PLUS.
module From_arrow_plus
(A : Preface_specs.ARROW_PLUS) :
Preface_specs.ALTERNATIVE with type 'a t = (unit, 'a) A.tmodule Index
(F : Preface_specs.ALTERNATIVE) :
Preface_specs.INDEXED_ALTERNATIVE with type ('a, 'index) t = 'a F.tAdvanced way to build an Preface_specs.ALTERNATIVE, constructing and assembling a component-by-component of Preface_specs.ALTERNATIVE. (In order to provide your own implementation for some features.)
module Via
(Core : Preface_specs.Alternative.CORE)
(Operation : Preface_specs.Alternative.OPERATION with type 'a t = 'a Core.t)
(Infix : Preface_specs.Alternative.INFIX with type 'a t = 'a Core.t)
(Syntax : Preface_specs.Alternative.SYNTAX with type 'a t = 'a Core.t) :
Preface_specs.ALTERNATIVE with type 'a t = 'a Core.tmodule Core_via_pure_map_and_product
(Req : Preface_specs.Alternative.WITH_PURE_MAP_AND_PRODUCT) :
Preface_specs.Alternative.CORE with type 'a t = 'a Req.tmodule Core_via_pure_and_apply
(Req : Preface_specs.Alternative.WITH_PURE_AND_APPLY) :
Preface_specs.Alternative.CORE with type 'a t = 'a Req.tmodule Core_via_pure_and_lift2
(Req : Preface_specs.Alternative.WITH_PURE_AND_LIFT2) :
Preface_specs.Alternative.CORE with type 'a t = 'a Req.tmodule Operation
(Core : Preface_specs.Alternative.CORE) :
Preface_specs.Alternative.OPERATION with type 'a t = 'a Core.tmodule Syntax
(Core : Preface_specs.Alternative.CORE) :
Preface_specs.Alternative.SYNTAX with type 'a t = 'a Core.tmodule Infix
(Core : Preface_specs.Alternative.CORE)
(Operation : Preface_specs.Alternative.OPERATION with type 'a t = 'a Core.t) :
Preface_specs.Alternative.INFIX with type 'a t = 'a Core.t