Yet Another Monad Tutorial
Jeff Newbern
jnewbern@nomaware.com
12 Aug 2003 15:29:27 +0100
Alistair,
Hhhmmm. That is an interesting issue, and I am unsure how to treat it
in the tutorial. I did attempt to explain the ability of the monad to
isolate impure computations, but I think I need to make a better
explanation of what an action is and how it is used.
As for the question of whether using a monad in this way casts Haskell
out of the ranks of the functionally pure, I don't know. This feels to
me like a debate over personal interpretation, with decent arguments on
both sides. I think the most accurate thing to say is that it enables
Haskell to incorporate non-pure features without destroying the purity
of the core of the language.
Any suggestions for how best to present this issue to a reader who may
be new to the world of FP? Should we mention it at all?
Thanks,
Jeff
Alistair Bayley wrote:
> Thanks. Quite comprehensive.
>
> Peter Van Roy (the Mozart/Oz guy) said this on the PragProg list, and
> I didn't have the knowledge to respond. It's a point you might want to
> address, perhaps in this section?:
> http://www.nomaware.com/monads/html/laws.html#nowayout
>
> [Discussion of whether I/O monad makes Haskell impure]
--
Jeff Newbern <jnewbern@nomaware.com>
Nomaware, Inc.