[Haskell-cafe] Re: [Haskell] Functor ((,) a)

Ross Paterson ross at soi.city.ac.uk
Wed Sep 19 10:05:13 EDT 2007


On Wed, Sep 19, 2007 at 10:24:50AM +0200, Janis Voigtlaender wrote:
> BTW, what would have been the easiest way for me to find this out on my 
> own? Somehow, I would have hoped to be able to navigate to the appropriate 
> point from the mentioned place in the online docs, where it is stated that 
> the instance in question exists.

Usually the instance for C (T a1 ... an) should be in either the module
defining C or the one defining T (so if you import both you have it);
if T is from the Prelude, then the instance should be together with C.

But Control.Monad.Instances is a special case, because exists to hold
instances of Haskell 98 classes for H98 types that are not defined in H98.
Putting them in the proper place would break compatibility with H98.


More information about the Haskell-Cafe mailing list