[Haskell] Announce: iteratee-0.1.0

Bas van Dijk v.dijk.bas at gmail.com
Thu Mar 12 04:09:58 EDT 2009


On Wed, Mar 11, 2009 at 9:36 PM, John Lato <jwlato at gmail.com> wrote:
> On Wed, Mar 11, 2009 at 4:27 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
>> On Tue, Mar 10, 2009 at 8:28 PM, John Lato <jwlato at gmail.com> wrote:
>>> I am pleased to announce the hackage release of iteratee-0.1.0.
>>
>> Nice!
>>
>> I think it would be nice if you make Monoid a superclass of
>> StreamChunk and remove the 'empty' and 'append' methods.
>>
>> I attached a darcs patch that does just that, adds the necessary
>> Monoid instances and updates all code to work with Monoids.
>>
>
> Thanks very much for this; it looks great.  Incidentally, one of the
> items planned for iteratee is some restructuring of types, in
> particular the StreamChunk class.  I would very much like to make
> further steps in this direction.
>
> John
>

Here's another bigger and perhaps more controversial patch that
generalizes the String error type to any type of error that is an
instance of the Control.Monad.Error.Error class. So the main change
is:

-data (SC.StreamChunk c el) => StreamG c el = EOF | Error String | Chunk (c el)

+data (SC.StreamChunk c el, Error err) => StreamG c el err = EOF |
Error err | Chunk (c el)

You should carefully review this patch because I made changes in parts
of the code that I haven't tried to understand yet. I just made
everything type check (which is usually sufficient in Haskell).

regards,

Bas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generalize_error.dpatch
Type: application/octet-stream
Size: 66127 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell/attachments/20090312/d739be66/generalize_error-0001.obj


More information about the Haskell mailing list