[Haskell] IO question

Graham Klyne GK at ninebynine.org
Fri Jun 11 10:22:38 EDT 2004


At 13:23 11/06/04 +0200, Tom Hofte wrote:
>Hi,
>
>I have an question about the IO monad
>
>I want to have a function that unpack an IO.
>I should have the type: IO a -> a.
>Is this possible?

Possible, but... in addition to other responses, I'd also recommend looking 
at this:
   http://www.nomaware.com/monads/html/laws.html#nowayout

If you can get computed values out the IO monad, you have the potential to 
seriously break many things.

#g
--


------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact



More information about the Haskell mailing list