[Haskell-cafe] enumeration I/O and non-sequential access

John Lato jwlato at gmail.com
Thu Oct 2 09:50:49 EDT 2008


Hello,

I've recently been looking at Oleg's Iteratee approach to I/O
(http://okmij.org/ftp/Haskell/Iteratee/), and I was wondering about
something.  In general this seems to be a very good approach to
handling sequential access, but I don't see a means of applying it
where non-sequential (esp. random) access is desired.  In fact, the
only way I see of doing so is to either hold references to all read
data in memory until the file has finished processing, or to iterate
over the file multiple times, depending on how the data is to be
processed.  I can't see how either of these approaches would scale
well.  Is this an actual problem?  Is there already a solution that
I'm not aware of?

Thanks,
John Lato


More information about the Haskell-Cafe mailing list