[Haskell-cafe] file i/o

Robert Heffernan bob.heffernan at gmail.com
Tue Jan 3 06:27:23 EST 2006


I am relatively new to Haskell and am finding i/o difficult to work
with.  I am trying to do something like the following:

I have a file of data, each line of which looks like this:
for example:
FOO ,2,1,4,3,6,7,5,9,10,11,8,13,12,

I would like to write a function the reads this file and returns
arrays like this:

Ideally, the function would return the first line when initially
called, the second the next time it is called and so on.  I would
settle for something that returned a big array comprising arrays of
the above type containing all the information in the file.  The file
is big, however.

I can not figure out how to do this from any of the tutorials so I
thought I might ask here.

Thank you for your help,

More information about the Haskell-Cafe mailing list