Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-25 Thread John Millikin
On Wed, Aug 25, 2010 at 01:33, John Lato wrote: > Is this really true?  Consider iteratees that don't have a sensible default > value (e.g. head) and an empty stream.  You could argue that they should > really return a Maybe, but then they wouldn't be divergent in other > formulations either.  Alt

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-25 Thread John Lato
From: John Millikin > > Here's my (uneducated, half-baked) two cents: > > There's really no need for an "Iteratee" type at all, aside from the > utility of defining Functor/Monad/etc instances for it. The core type > is "step", which one can define (ignoring errors) as: > >data Step a b = Con

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread wren ng thornton
On 8/24/10 3:54 AM, C. McCann wrote: What sets an iteratee-style design apart from something conventional based on a State monad is that the iteratee conceals its internal state completely (in fact, there's no reason an iteratee even has to be the "same" function step-to-step, or have a single co

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread Stephen Tetley
Thanks for taking a look - I've never got round to investigating the connection properly but have noticed the strong similarity between the data type defintions of the ResT and Iteratee. William Harrison makes the interesting point in the "Cheap Threads" papers that by itself the resumption monad

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread John Millikin
Here's my (uneducated, half-baked) two cents: There's really no need for an "Iteratee" type at all, aside from the utility of defining Functor/Monad/etc instances for it. The core type is "step", which one can define (ignoring errors) as: data Step a b = Continue (a -> Step a b)

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread C. McCann
On Tue, Aug 24, 2010 at 11:44 AM, John Lato wrote: >> Aren't they closer - in implementation and by supported operations - >> to resumptions monads? >> >> See many papers by William Harrison here: >> http://www.cs.missouri.edu/~harrisonwl/abstracts.html > > I'm not familiar with resumption monads.

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread John Lato
> > From: Stephen Tetley > > On 24 August 2010 13:00, John Lato wrote: > > > This is how I think of them. I particularly your description of them as > a > > foldl with a "pause" button. > > Maybe it would be helpful to consider iteratees along with delimited > > continuations? > > Aren't they cl

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread Stephen Tetley
On 24 August 2010 13:00, John Lato wrote: > This is how I think of them.  I particularly your description of them as a > foldl with a "pause" button. > Maybe it would be helpful to consider iteratees along with delimited > continuations? Aren't they closer - in implementation and by supported op

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread John Lato
> > From: "C. McCann" > > What sets an iteratee-style design apart from something conventional > based on a State monad is that the iteratee conceals its internal > state completely (in fact, there's no reason an iteratee even has to > be the "same" function step-to-step, or have a single consiste

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-24 Thread C. McCann
On Mon, Aug 23, 2010 at 11:41 PM, wren ng thornton wrote: > I believe the denotation of an iteratee is the transition function for an > automaton (or rather a transducer). I hesitate to speculate on the specific > kind of automaton without thinking about it, so maybe finite, maybe > deterministic,

Re: [Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-23 Thread wren ng thornton
Conal Elliott wrote: For anyone interested in iteratees (etc) and not yet on the iteratees mailing list. I'm asking about what iteratees *mean* (denote), independent of the various implementations. My original note (also at the end below): With the encouragement & help of Conrad Parker, I've

[Haskell-cafe] Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-08-22 Thread Conal Elliott
For anyone interested in iteratees (etc) and not yet on the iteratees mailing list. I'm asking about what iteratees *mean* (denote), independent of the various implementations. My original note (also at the end below): With the encouragement & help of Conrad Parker, I've been looking at > iterat