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

Evan Laforge qdunkan at gmail.com
Fri Sep 11 22:22:47 EDT 2009

> 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?

Well, it may be more accurate to say that class instances have no
namespaces, and are all implicitly global.  When you import a module,
you get all the instances it defines in the global namespace, whether
you want them or not.  Like I said, there was some argument with
people on one side saying importing is a valid way of controlling
instance visibility, and another side saying the fact that you have to
import at all is an implementation artifact and instances should be
considered global.

Practically speaking, I buy the second argument more, for the reason
you described above.

More information about the Haskell-Cafe mailing list