
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 You're right - my statement is inaccurate. Implementation details aside, I am referring specifically to the statement "getChar ... has the type signature of a value". It clearly does not. Lennart Augustsson wrote:
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
wrote: 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)
Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
- -- Tony Morris http://tmorris.net/ S, K and I ought to be enough for anybody. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmQAfkACgkQmnpgrYe6r61tmQCcCx42Cz1iunkD7JGubla/z2Pg uhAAoLk5rkjeHnrfc936IhYoBQYO/+0r =6xWk -----END PGP SIGNATURE-----