Re: [Haskell-cafe] Iteratee IO examples

On 6/25/11 6:51 AM, John Lato wrote:
Honestly I'm quite dis-satisfied with the current state of code which depends on iteratee/enumerator. It's nearly all written in a very low-level style, i.e. directly writing 'liftI step', or 'case x of Yield -> ...'. This is exactly what I would hope users could avoid, by using the functions in e.g. Data.Iteratee.ListLike.
I've recently added more functions to iteratee which greatly reduce the need for this type of code. I don't know about enumerator, but I expect it isn't rich enough since most user code I've seen is pretty low-level.
I have a rather large suite of list-like functions for the old version of iteratee (used by a project I've been working on for a while). Once I get the time to convert the project to the newer iteratee, I'll send a patch with any you're still missing. (Though, admittedly, I'm not terribly keen on ListLike. The classes still seem too monolithic and ad-hoc. Though I'm not sure there's a way around that without something closer to ML's functor modules.) -- Live well, ~wren

On Sat, Jun 25, 2011 at 10:18 PM, wren ng thornton
On 6/25/11 6:51 AM, John Lato wrote:
Honestly I'm quite dis-satisfied with the current state of code which depends on iteratee/enumerator. It's nearly all written in a very low-level style, i.e. directly writing 'liftI step', or 'case x of Yield -> ...'. This is exactly what I would hope users could avoid, by using the functions in e.g. Data.Iteratee.ListLike.
I've recently added more functions to iteratee which greatly reduce the need for this type of code. I don't know about enumerator, but I expect it isn't rich enough since most user code I've seen is pretty low-level.
I have a rather large suite of list-like functions for the old version of iteratee (used by a project I've been working on for a while). Once I get the time to convert the project to the newer iteratee, I'll send a patch with any you're still missing.
I'd greatly appreciate it. Even if they're for the old version; doing the conversion is fairly mechanical.
(Though, admittedly, I'm not terribly keen on ListLike. The classes still seem too monolithic and ad-hoc. Though I'm not sure there's a way around that without something closer to ML's functor modules.)
Refactoring ListLike has been a long-standing objective of mine, but I haven't put much time into it because it would cause breaking changes which I didn't think anyone else would appreciate. No way to tell except to just release it I guess. John
participants (2)
-
John Lato
-
wren ng thornton