package preface
Module Preface_make.Writer
Building a Preface_specs.Writer, a Writer transformer.
Using the minimal definition
Build an Preface_specs.WRITER over an Inner Preface_specs.MONAD and given a monoidal tape.
module Over_monad
(M : Preface_specs.MONAD)
(Tape : Preface_specs.MONOID) :
Preface_specs.WRITER with type tape = Tape.t and type 'a monad = 'a M.tImproving API
If there are complementary implementations to Preface_specs.MONAD attached to the Inner Preface_specs.MONAD type, it is possible to promote the Preface_specs.WRITER API with these complementary implementations
Functor
If the Inner Preface_specs.MONAD is also a Preface_specs.FUNCTOR, the Writer monad is also a Preface_specs.FUNCTOR.
module Functor
(F : Preface_specs.FUNCTOR)
(Tape : Preface_specs.MONOID) :
Preface_specs.FUNCTOR with type 'a t = ('a * Tape.t) F.tApplicative
If the Inner Preface_specs.MONAD is also an Preface_specs.APPLICATIVE, the Writer monad is also an Preface_specs.APPLICATIVE.
module Applicative
(A : Preface_specs.APPLICATIVE)
(Tape : Preface_specs.MONOID) :
Preface_specs.APPLICATIVE with type 'a t = ('a * Tape.t) A.tAlternative
If the Inner Preface_specs.MONAD is also an Preface_specs.ALTERNATIVE, the Writer monad is also an Preface_specs.ALTERNATIVE.
module Alternative
(A : Preface_specs.ALTERNATIVE)
(Tape : Preface_specs.MONOID) :
Preface_specs.ALTERNATIVE with type 'a t = ('a * Tape.t) A.tMonad
If the Inner Preface_specs.MONAD is also a Preface_specs.MONAD, the Writer monad is also a Preface_specs.MONAD (this is this functor which is used in the full API definition).
module Monad
(M : Preface_specs.MONAD)
(Tape : Preface_specs.MONOID) :
Preface_specs.MONAD with type 'a t = ('a * Tape.t) M.tMonad Plus
If the Inner Preface_specs.MONAD is also a Preface_specs.MONAD_PLUS, the Writer monad is also a Preface_specs.MONAD_PLUS.
module Monad_plus
(M : Preface_specs.MONAD_PLUS)
(Tape : Preface_specs.MONOID) :
Preface_specs.MONAD_PLUS with type 'a t = ('a * Tape.t) M.tManual construction
Advanced way to build an Preface_specs.WRITER, constructing and assembling a component-by-component of Preface_specs.WRITER. (In order to provide your own implementation for some features.)
Building Core
module Core_over_monad
(Monad : Preface_specs.MONAD)
(Tape : Preface_specs.MONOID) :
Preface_specs.Writer.CORE
with type tape = Tape.t
and type 'a monad = 'a Monad.t