Open bkc39 opened 9 years ago
All of the implementations are here now. What's left is defining the abstract signature for the transformer and having each of the Transformers include a common sig, which will essentially be
module type TRANSFORMER = sig
include Monad.S
val lift : 'a M.t -> 'a t
end
The problem here is that M
is unbound so you have to make it a functor. The problem with that is that it precludes having the "right" signatures for the higher kinded transformers like ReaderT
. This means we have to
TRANSFORMER
signature.MONAD_DEF
instance is passed first into the TRANSFORMER
functor for higher kinded TRANSFORMER
s.
At the bare minimum, we need
There are already full implementations of these in ocaml-monadic. It's just a matter of porting.
However, it may be better to consider modeling off of the haskell mtl.