[Haskell-cafe] Haskell & monads for newbies

Hugh Perkins hughperkins at gmail.com
Sat Jul 14 14:58:54 EDT 2007

On 7/14/07, Andrew Coppin <andrewcoppin wrote:
> That is my recollection also. (Don't ask me *which* monads, mind you...)
In the case in point, the law breakage never the less matches
"intuition"; personally, I ignore the monad laws on the basis that if
you're doing something "sane", the laws will automatically hold anyway.
(But maybe I'm just a renegade?)

Yeah, the laws confused me for a while as well.  Hint to guys writing
Haskell documentation, we're not all doing CS phD you know ;-)  We just want
to get things done ;-)

Andrew, I found comfort and explanation in this article
http://www.haskell.org/haskellwiki/Monads_as_containers :

"The functions return and bind need to satisfy a few
laws<http://www.nomaware.com/monads/html/laws.html#laws>in order to
make a monad, but if you define them in a sensible way given
what they are supposed to do, the laws will work out. The laws are only a
formal way to give the informal description of the meanings of return and
bind I have here."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070714/5483bd90/attachment.htm

More information about the Haskell-Cafe mailing list