
14 Dec
2011
14 Dec
'11
6:49 a.m.
Hello, When looking at the Alternative instance of Maybe I noticed that the <|> combinator doesn't share it's first argument when it could. So I propose to make the following change: instance Alternative Maybe where empty = Nothing - Nothing <|> p = p - Just x <|> _ = Just x + Nothing <|> r = r + l <|> _ = l Since this isn't a change in the API, I guess this doesn't need to go through the library submission process. http://hackage.haskell.org/trac/ghc/ticket/5699 Cheers, Bas