Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1d97ad10283d23b6dfb698a38ae57c29accd6ada >--------------------------------------------------------------- commit 1d97ad10283d23b6dfb698a38ae57c29accd6ada Author: Bas van Dijk <[email protected]> Date: Wed Dec 14 12:24:38 2011 +0100 Use sharing in the Alternative instance of Maybe >--------------------------------------------------------------- Control/Applicative.hs | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Control/Applicative.hs b/Control/Applicative.hs index bf58bea..3a9db61 100644 --- a/Control/Applicative.hs +++ b/Control/Applicative.hs @@ -156,8 +156,8 @@ instance Applicative Maybe where instance Alternative Maybe where empty = Nothing - Nothing <|> p = p - Just x <|> _ = Just x + Nothing <|> r = r + l <|> _ = l instance Applicative [] where pure = return _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
