[Haskell-cafe] Simple network client

Adam Langley agl at imperialviolet.org
Wed Jan 30 16:07:32 EST 2008

On Jan 30, 2008 12:04 PM, Bryan O'Sullivan <bos at serpentine.com> wrote:
> Adam Langley wrote:
> I'd have expected it to look more like this:
> data Result a = Failed String
>               | Finished B.ByteString a
>               | Partial (B.ByteString -> Result a)
> (The change here is from a list to a singleton.)  I don't think I care
> much for the extra boxing and reversing this involves.

Well, since you're probably the /only/ user you can pretty much say
how it works ;) The original interface was designed so that you can
yield a list of results as you parse. I guess that, since you get the
remainder anyway, you can chain these together if you like anyway.

So, if I don't hear otherwise soon, I'll probably push a new version
of binary-strict later on today with the interface above.


Adam Langley                                      agl at imperialviolet.org
http://www.imperialviolet.org                       650-283-9641

More information about the Haskell-Cafe mailing list