bkc39 / ocaml-prelude

Includes the functions you need, that INRIA didn't.
GNU General Public License v3.0
5 stars 0 forks source link

Add the standard monad transformers #3

Open bkc39 opened 9 years ago

bkc39 commented 9 years ago

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.

bkc39 commented 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