a readFile problem
Hal Daume III
Mon, 2 Jun 2003 08:57:49 -0700 (PDT)
It would probably be helpful if you were to post the code you have and
explain what part isn't working. There's a function:
readFile :: FilePath -> IO String
(FilePath is just a String)
which reads a file. This should be what you need to solve this
Hal Daume III | firstname.lastname@example.org
"Arrest this man, he talks in maths." | www.isi.edu/~hdaume
On Mon, 2 Jun 2003, Naudts, Guido wrote:
> I have the following problem:
> my program asks the user for a command, when the command is executed a
> new command is asked (this is no problem ; an example is in the HUgs
> distribution namely Main.hs in the Prolog example.
> However one of the commands is: read filename
> i.e. read a file and display it.
> I do not succeed in implementing this.
> Could anyone give an example of: reading commands in a loop where one of
> the commands is the read command mentionned above.
> Or is it not possible in Haskell?
> I have already wated a lot of time on this, so if anyone gives me an
> answer I will be very gratefull.