Functor (Either a)

Ian Lynagh igloo at
Sun Jul 15 15:27:51 EDT 2007

Hi Conor,

On Sun, Jul 15, 2007 at 08:20:25PM +0100, Conor McBride wrote:
> and it does rather suggest that there's an instance of Functor for  
> (Either a). Yet,
> Prelude> fmap not (Right True)
> <interactive>:1:0:
>     No instance for (Functor (Either a))
>       arising from use of `fmap' at <interactive>:1:0-20

It's in Control.Monad.Instances:

Prelude> :m + Control.Monad.Instances
Prelude Control.Monad.Instances> fmap not (Right True)
Right False

I don't know if there's a way of deducing that from the haddock


More information about the Libraries mailing list