
Er, hi... On 5 Jan 2011, at 11:24, Bas van Dijk wrote:
On Wed, Jan 5, 2011 at 11:33 AM, Simon Marlow
wrote: Furthermore, we have some significant compatibility issues with Haskell 98/2010 code. I wouldn't be in favour of doing this unless we can retain Haskell 98/2010 compatibility somehow (e.g. with superclass defaults or class aliases).
It would indeed be really nice to have something like this:
{-# LANGUAGE DefaultInstances #-}
class Functor f where fmap :: (a → b) → f a → f b
class Functor f ⇒ Applicative f where pure :: a → f a (<*>) :: f (a → b) → f a → f b
instance Functor f where fmap f m = pure f <*> m
[..]
Now only someone has to implement it :-)
(ahem) cabal install she http://personal.cis.strath.ac.uk/~conor/pub/she/superclass.html [ducks and runs] Conor