Functor (Either a)

Conor McBride ctm at cs.nott.ac.uk
Sun Jul 15 15:20:25 EDT 2007


Hi all

I read TFM

   http://haskell.org/ghc/docs/latest/html/libraries/base/ 
Prelude.html#t%3AFunctor

and it does rather suggest that there's an instance of Functor for  
(Either a). Yet,

    ___         ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell  
98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
Prelude> fmap not (Right True)

<interactive>:1:0:
     No instance for (Functor (Either a))
       arising from use of `fmap' at <interactive>:1:0-20


Am I being dim?

Conor



More information about the Libraries mailing list