Repository : ssh://darcs.haskell.org//srv/darcs/packages/ghc-prim On branch : ghc-generics1
http://hackage.haskell.org/trac/ghc/changeset/d7a70b01ff0cfaefba264813fd651bc37dcfe67e >--------------------------------------------------------------- commit d7a70b01ff0cfaefba264813fd651bc37dcfe67e Author: Jose Pedro Magalhaes <[email protected]> Date: Sun Apr 22 10:07:52 2012 +0200 Move Functor from base to ghc-prim This is because deriving Generic1 uses Functor, and haddock seems to trip on that. This is not an ideal fix, though, and I hope to change it back in the future. >--------------------------------------------------------------- GHC/Classes.hs | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/GHC/Classes.hs b/GHC/Classes.hs index 7be590b..0408ecf 100644 --- a/GHC/Classes.hs +++ b/GHC/Classes.hs @@ -30,11 +30,21 @@ import GHC.Generics (Arity(..), Associativity(..), Fixity(..)) infix 4 ==, /=, <, <=, >=, > +infixl 4 <$ infixr 3 && infixr 2 || default () -- Double isn't available yet +class Functor f where + fmap :: (a -> b) -> f a -> f b + + -- | Replace all locations in the input with the same value. + -- The default definition is @'fmap' . 'const'@, but this may be + -- overridden with a more efficient version. + (<$) :: a -> f b -> f a + a <$ f = fmap (\_ -> a) f + -- | The 'Eq' class defines equality ('==') and inequality ('/='). -- All the basic datatypes exported by the "Prelude" are instances of 'Eq', -- and 'Eq' may be derived for any datatype whose constituents are also _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
