[Haskell-beginners] Ignore in import

Mike Houghton mike_k_houghton at yahoo.co.uk
Sat Oct 24 11:55:59 UTC 2015


Hi,


I’m reading Typeclassopdedia and an exercise is 

"A good exercise is to implement Functor instances for Either e, ((,) e), and
((->) e).”

so I have

instance Functor ((,) a) where
    fmap = undefined

which gives compiler error

Duplicate instance declarations:
      instance Functor ((,) a)
        -- Defined at /Users/mike/haskell/FingerTrees/M.hs:65:10
      instance Functor ((,) a) -- Defined in ‘GHC.Base’


so I added 
import GHC.Base hiding ((,))

but I still get the error.

Where am I going wrong?

Many thanks

Mike



More information about the Beginners mailing list