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

Marc Weber marco-oweber at gmx.de
Fri Feb 17 08:42:18 EST 2006

You can access IO values only from within do blocks (see any tutorial,
previous posts or google).
It looks like this then:
  myvalue <- functionwhichreturnsIOValue
  dosomethingwith myvalue

Due to monads you don't have to leave the IO monad this way.
Oh. Have to go now.

do is translated into >>= syntax, see do expansion.

Hope this did help else wait for another longer answer ;-)


More information about the Haskell-Cafe mailing list