[Haskell-cafe] (Newbie Question) How to get the value of an "IO String" Monad?

Ketil Malde ketil.malde at bccs.uib.no
Fri Feb 17 09:00:06 EST 2006


Peter <peter at commonlawgov.org> writes:

> So, How am I supposed to get the value of an IO Monad, such as "IO
> String", without returning an IO Monad?

Short answer: you don't.  IO is a one way street.  

Build your application top down in the IO monad (starting with
'main'), and bottom up with pure code, and hope you can make them meet
somewhere in the middle. :-)

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Haskell-Cafe mailing list