[Haskell-cafe] Newbied question on IO Monad
Sara Kenedy
sarakenedy at gmail.com
Tue Sep 12 08:05:42 EDT 2006
Hello all,
update :: String -> String
update sss = ...
main = do writeFile "myFile.txt" sss
x <- callSystem "myFile.txt"
y <- openFile "result.txt" ReadMode
zzz <- hGetContents y
return zzz
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.
S.
More information about the Haskell-Cafe
mailing list