
Not it doesn't. getChar has the type signature IO Char.
The IO type is abstract. GHC happens to implement it by a state monad.
But in, e.g., hbc it is implemented in a totally different way,
more like a continuation monad.
Peeking inside an implementation of IO can be illuminating,
but one must remember that IO is abstract.
-- Lennart
On Mon, Feb 9, 2009 at 10:26 AM, Tony Morris
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Gregg Reynolds wrote:
The point being that the metalanguage commonly used to describe IO in Haskell contains a logical contradiction. A thing cannot be both a value and a function, but e,g, getChar behaves like a function and has the type signature of a value. getChar has the signature RealWorld -> (RealWorld, Char)
- -- Tony Morris http://tmorris.net/
********************************************************* * Anteromedial Heterotopic Osseous Impingement Syndrome * *********************************************************
http://www.ajronline.org/cgi/content/full/178/3/601 "can result in chronic ankle pain, especially in athletes and the younger population (15-40 years old)"
http://radiographics.rsnajnls.org/cgi/content/figsonly/22/6/1457 "Soft-tissue and osseous impingement syndromes of the ankle can be an important cause of chronic pain, particularly in the professional athlete."
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJj/bcmnpgrYe6r60RAicqAJ9z3f+aM/k+gDv8d5yAaNSCFf9NVQCfX3Qo ItFqQSWPDUE2h9WS+axAXV8= =c8Nw -----END PGP SIGNATURE-----
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe