[Haskell-cafe] The applicative instances for Either?

Ketil Malde ketil at malde.org
Mon Sep 19 10:14:39 CEST 2011

Daniel Fischer <daniel.is.fischer at googlemail.com> writes:

>> Is there any information, or otherwise accessible source specifying
>> exactly when this was changed,

> Checking the sources, it wasn't in base- (ghc-6.12.3), but it was in 
> base- (ghc-7.0.2), so it was introduced with base-4.3

Thanks to you, and everybody else who replied.  Now, it turns out, both
me (who get this instance from imports) and my user (who doesn't) are
using base-, so it has to be elsewhere.  
The duplicate instance reports Control.Monad.Trans.Error - hackage
insists this is part of "transformers", which I don't use, but maybe mtl
imports and reexports the instances?

Apparently this is the case, I tried to ghc-pkg hide mtl-2, and then I
could load a file declaring an instance for Error e => Applicative
(Either e) using mtl-1.

So it appears I should require mtl >= 2 (and possibly base >= 4.3 as an
alternative, but I guess mtl-2 is not too draconian).

(This case was a bit opaque for me, I'm not sure how it could be made
easier to trace down conflicts like this, perhaps I just don't know the
right tools.)

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list