package preface
Module Preface_make.Alternative
Building a Preface_specs.Alternative
Using the minimal definition
Using pure, apply, neutral and combine
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.tUsing pure, map, product, neutral and combine
Build 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.tUsing pure, lift2, neutral and combine
Build 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.tOver an applicative
Build 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.tAlternative Algebra
Construction of Preface_specs.ALTERNATIVE by combining them.
Composition
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.tProduct
Construct 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.tFrom other abstraction
From an Arrow Plus
Produces 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.tTo other abstraction
To an Indexed Alternative
module Index
(F : Preface_specs.ALTERNATIVE) :
Preface_specs.INDEXED_ALTERNATIVE with type ('a, 'index) t = 'a F.tManual construction
Advanced 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.)
Grouping of all components
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.tBuilding Core
module 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.tDeriving Operation
module Operation
(Core : Preface_specs.Alternative.CORE) :
Preface_specs.Alternative.OPERATION with type 'a t = 'a Core.tDeriving Syntax
module Syntax
(Core : Preface_specs.Alternative.CORE) :
Preface_specs.Alternative.SYNTAX with type 'a t = 'a Core.tDeriving Infix
module 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