[Haskell-cafe] lightweight alternative to mtl?

Ertugrul Söylemez es at ertes.de
Sat Jun 16 16:41:12 CEST 2012


Anton Kholomiov <anton.kholomiov at gmail.com> wrote:

> What are you using instead of mtl? I need simple type for State.  The
> more classy it gets the harder error messages are to understand.  I've
> installed new package. Silently it installed new mtl.  And here I'm
> staring into three lines of code for half an hour trying to understand
> where I misused the types. Compiler tells me long story about
> functional dependencies.  After downgrade it takes me a second to find
> the mistake.  Ohh type mismatch, forgot to pass an argument.
>
> It's class for strict and lazy states. Maybe it's better to take
> approach of containers (the same interface and different modules)?

If you are looking for a monomorphic approach you can use the
'transformers' library directly, on which mtl (since version 2) is
based.  This makes error messages better, but is also less flexible.
Also 'transformers' is slightly less convenient to use.

For totally different approaches to monad transformer libraries you can
also have a look at monadLib and contstuff.  However, personally I
nowadays recommend mtl over all the three other choices.


Greets,
Ertugrul

-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120616/e1f52e5f/attachment.pgp>


More information about the Haskell-Cafe mailing list