[Haskell-cafe] Newbied question on IO Monad
sarakenedy at gmail.com
Tue Sep 12 08:05:42 EDT 2006
update :: String -> String
update sss = ...
main = do writeFile "myFile.txt" sss
x <- callSystem "myFile.txt"
y <- openFile "result.txt" ReadMode
zzz <- hGetContents y
I know that function main returns IO String, function update returns
String. And my purpose is to get the string zzz from main for the
value return of function update. But I do not know which way I can do.
Sorry if the question seems ridiculous. Thanks for any help.
More information about the Haskell-Cafe