[Haskell-cafe] instance Monad (Either String) in Prelude or Data.Either?

Michael Steele mikesteele81 at gmail.com
Fri Sep 11 22:11:57 EDT 2009


> Right.  I know there was some argument a while back, but I thought
> that position that instances are global period was pretty "official".
> At least it made sense to me.  The more libraries you import the less
> control you have over the extent of what they may import.  But I guess
> it wouldn't be haskell if every third person didn't have an idea for a
> better way to implement the mtl...  I just want an exception with a
> message though!


A few days ago I was trying to refactor some code to use transformers +
monads-tf instead of mtl.  Eventually I gave up after getting error messages
about Either having conflicting Monad instances.  A few of the libraries I'm
using depend on mtl.

if I understand you correctly, all libraries that software I write depends
on, directly or indirectly, must be free of namespace conflicts.  Is that
correct?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090911/fd5221f4/attachment.html


More information about the Haskell-Cafe mailing list