
18 Aug
2013
18 Aug
'13
4:15 p.m.
On 2013-08-18 at 20:26:23 +0200, Petr Pudlák wrote: [...]
I'd say that with `undefined` we can fail other equality laws. For example: For `MonadPlus` we have `m >>= (\x -> mzero) == mzero`. But it clearly fails in ```haskell undefined >>= (\x -> mzero) :: Maybe Int ``` The result is `undefined` instead of `mzero`. (Or does it mean that Maybe is broken?)
Btw/fyi, there was a thread "Monad laws in presence of bottoms" some time ago on haskell-cafe that seems related: http://haskell.1045720.n5.nabble.com/Monad-laws-in-presence-of-bottoms-td549... cheers, hvr