On Oct 15, 2007, at 9:48 , Brandon S. Allbery KF8NH wrote:
On Oct 15, 2007, at 7:02 , jerzy.karczmarczuk@info.unicaen.fr wrote:
IO is different, you *cannot* make it non-monadic.
Not really true; it's just much more painful.
Expanding on this slightly: the neat thing about Haskell's monads is not that they are somehow not "pure". It is that they a completely pure and referentially transparent way to capture and safely encapsulate concepts that themselves may *not* be pure or referentially transparent, such as IO --- while simultaneously being useful for concepts that *are* pure and referentially transparent, such as State or Maybe/Either/[]. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH