Hi Sebastian,

I imagine that many of the instances are defined in the module that
defines the data type. For example, the STM instance is defined in the
same module as the STM type.

Are there any particular ones you're running into problems with?

Take care,
Antoine

On Thu, Dec 9, 2010 at 11:10 PM, Sebastian Fischer <fisc...@nii.ac.jp> wrote:
> Hello,
>
> according to
>
> http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Monad.html
>
> Control.Monad exports 20 Functor instance declarations in base-4.3.0.0.
> However:
>
>    bash# ghc-pkg list | grep base
>        base-4.3.0.0
>    bash# ghci --version
>    The Glorious Glasgow Haskell Compilation System, version 7.0.1
>    bash# ghci
>    Prelude> import Control.Monad
>    Prelude Control.Monad> :i Functor
>    class Functor f where
>      fmap :: (a -> b) -> f a -> f b
>      (GHC.Base.<$) :: a -> f b -> f a
>            -- Defined in GHC.Base
>    instance Functor Maybe -- Defined in Data.Maybe
>    instance Functor [] -- Defined in GHC.Base
>    instance Functor IO -- Defined in GHC.Base
>
> There are only 3 instances instead of 20. Importing Control.Applicative
> gives 3 more instances but for example the instance for ((->) r) is
> still missing.
>
> Is my installation broken? Or has anybody similar problems finding
> Functor instances in GHC 7?
>
> Sebastian
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>

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

Reply via email to