[Haskell] Functor ((,) a)

Janis Voigtlaender voigt at tcs.inf.tu-dresden.de
Wed Sep 19 03:55:42 EDT 2007


the Prelude docs found via


claim that there is an instance

Functor ((,) a)

And yet, I get (in GHC, but similarly in Hugs):

Prelude> fmap (+1) (undefined,2)

     No instance for (Functor ((,) a))
       arising from use of `fmap' at <interactive>:1:0-22
     Possible fix: add an instance declaration for (Functor ((,) a))
     In the expression: fmap ((+ 1)) (undefined, 2)
     In the definition of `it': it = fmap ((+ 1)) (undefined, 2)

What do I have to import to get the Functor ((,) a) instance?

(Of course, I can define it myself, but this is not the point.)


Dr. Janis Voigtlaender
mailto:voigt at tcs.inf.tu-dresden.de

More information about the Haskell mailing list