[Haskell-cafe] MonadLib usage
emilmeln at gmail.com
Sun Jul 18 09:17:00 EDT 2010
Recently I discovered for myself "monadLib" as an alternative for
mtl-like packages. It seems that "monadLib" has better interface,
but I'm quite confused with it's type classes: they have the
monad type variable before the effect type variable (e.g.
"ReaderM m i" instead of "ReaderM i m"). AFAIU, this ordering
makes impossible to use these type classes in conjunction with
GHC's cunning newtype deriving extension. Of course one can
easily derive all instances using functionality provided by
"MonadLib.Derive" module, but this is a boilerplate. Is there
any way to avoid this boilerplate?
More information about the Haskell-Cafe