Ticket #5087 (closed bug: duplicate)
No instance for (Functor ((->) b0)) arising from a use of `<$>'
Description
I'm pretty new to Haskell so sorry if there is already a bug report for this or if it isn't a bug of ghc at all (e.g. some packaging problem).
I read learnyouahaskell.com and want to play with the Applicative Instance of (->) r. But when I enter
import Control.Applicative (+) <$> (+3) <*> (*100) $ 5
in ghci I get the following error: <interactive>:1:5:
No instance for (Functor ((->) b0))
arising from a use of `<$>'
Possible fix: add an instance declaration for (Functor ((->) b0)) In the first argument of (<*>)', namely (+) <$> (+ 3)' In the expression: (+) <$> (+ 3) <*> (* 100) In the expression: (+) <$> (+ 3) <*> (* 100) $ 5
This Problem does not occur when executing this small testprogramm with "ghc --make" or "runhaskell":
import Control.Applicative main = print $ (+) <$> (+3) <*> (*100) $ 5
So it seems ghci releated. I downgraded to 6.12.3 where the problem doesn't occur. I'm using Archlinux.
