
On Jan 30, 2008 12:04 PM, Bryan O'Sullivan
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. AGL -- Adam Langley agl@imperialviolet.org http://www.imperialviolet.org 650-283-9641