
20 Feb
2012
20 Feb
'12
1:42 p.m.
I just realised that many common monads do not obey the monad laws when it comes to bottoms. E.g. for the Reader monad: undefined >>= return /= undefined return () >>= undefined /= undefined return () >>= const undefined /= undefined return undefined >>= \x -> case x of () -> return () /= undefined Not a long time ago David Barbour argued on this list that bottoms should be ignored when checking the monad laws. Is that the commonly accepted interpretation of the laws? Is there any other interpretation in which the Reader monad obeys the laws? -- Roman I. Cheplyaka :: http://ro-che.info/