how to convert IO String to string

Ashley Yakeley ashley@semantic.org
Fri, 22 Nov 2002 15:09:34 -0800


At 2002-11-22 14:49, Ahn Ki-yung wrote:

>'do' is a syntactic sugar of monadic operations.
>The original form can be written as
>
>main = myReadFile >>= \s -> putStrLn s

That's correct. In this case, the 's' has type String. So the IO String 
has been 'converted' into a String, but only within the context of the IO 
monad.

I think ultimately everything is syntactic sugar.

-- 
Ashley Yakeley, Seattle WA