Task

(Over)write a file so that it contains a string.



The reverse of Read entire file—for when you want to update or create a file which you would read in its entirety all at once.




main :: IO ( )
main = do
   putStrLn "Enter a string!"
   str <- getLine
   putStrLn "Where do you want to store this string ?"
   myFile <- getLine
   appendFile myFile str