[Haskell-cafe] Missing Functor instances in GHC 7?
aslatter at gmail.com
Fri Dec 10 06:20:55 CET 2010
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?
On Thu, Dec 9, 2010 at 11:10 PM, Sebastian Fischer <fischer at nii.ac.jp> wrote:
> according to
> Control.Monad exports 20 Functor instance declarations in base-18.104.22.168.
> bash# ghc-pkg list | grep base
> 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?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe