[Haskell-cafe] The Proliferation of List-Like Types
Johan Tibell
johan.tibell at gmail.com
Fri Feb 22 03:59:49 EST 2008
On Fri, Feb 22, 2008 at 9:31 AM, Thomas Schilling
<nominolo at googlemail.com> wrote:
> On 22 feb 2008, at 08.18, Jules Bean wrote:
> >
> > You can't call a stream-abstraction utility using a left-fold-
> > enumerator without cheating (unsafeInterleave), because the stream-
> > abstraction is incompatible (and leaky! even though it is convenient).
> >
> > You can convert in the other direction fine.
> >
> > Chunk are no problem, and convertible: you can build an element
> > fold from a chunk fold, and a chunk fold from an element fold (as
> > long as there is an 'end-of-input' marker).
>
> Hm, thinking about it, parsers just need to be able to return a
> continuation instead of fail at the end of the input. This
> continuation can then be invoked with the next chunk as input.
This is what I'll do and it is also what binary-strict's [1]
IncrementalGet parser does.
1. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary-strict-0.3.0
-- Johan
More information about the Haskell-Cafe
mailing list