
13 Aug
2008
13 Aug
'08
11:17 p.m.
On Wed, Aug 13, 2008 at 3:02 PM, Tim Newsham
However, I think probably the real blame here should probably go to Data.Binary which doesn't attempt to check that it has consumed all of its input after doing a "decode". If "decode" completes and there is unconsumed data, it should probably raise an error (it already raises errors for premature EOF). There's no reason for it not to, since it does not provide the unconsumed data to the caller when its done, anyway...
You missed runGetState in Data.Binary.Get, which I added. It's definitely not an error in the abstract to have excess input after you're done decoding. In your specific application, it might be, but then you should write a combinator that checks for this state.