On Fri, 2010-12-10 at 14:35 +0900, Sebastian Fischer wrote:
> Yes, I cannot find the Functor instance for ((->) r).

As the Applicative instance for ((->) r) depends on the Functor instance
I "only" needed to go through the imports of Control.Applicative to find
that the Functor instance of ((->) r) is defined in
Control.Monad.Instances. If I import this module into GHCi, it finds the
instance.

Interestingly, if I import only Control.Applicative from within GHCi, it
does not find the instances defined in Control.Monad.Instances although
this module is imported in Control.Applicative. On the other hand, if I
write a file containing the line 'import Control.Applicative' and load
this file in GHCi then the instances from Control.Monad.Instances are
visible.

Apparently, importing a module in GHCi differs from importing it in a
Haskell file and loading this into GHCi.

Sebastian


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to