
My problem with interact was that it doesn't give me the line when the user
hits enter but instead it gives me all the lines at once when stdin is
closed (unless I did something wrong)
The other problem is that I want to stop the command processing when the
user types the command "exit" and it seems interact can't do that.
On Sun, Mar 31, 2013 at 2:52 PM, Lyndon Maydwell
Depending on what you're doing with the lines, it may be worth checking out the `interact` function as well :-)
On Sun, Mar 31, 2013 at 7:42 PM, Kim-Ee Yeoh
wrote: I would like to make this function to have the signature f : IO [String] ...such that I can get rid of the IO monad and pass the pure string
On Sun, Mar 31, 2013 at 5:19 PM, Ovidiu D
wrote: list to the processing function.
You could use:
getContents >>= lines :: IO [String]
-- Kim-Ee
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners