[Haskell-cafe] two problems with Data.Binary and Data.ByteString

Antoine Latter aslatter at gmail.com
Wed Aug 13 19:30:45 EDT 2008


On Wed, Aug 13, 2008 at 5:02 PM, Tim Newsham <newsham at lava.net> wrote:
>
> 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...
>

Would the error be raised in 'decode' or in 'runGet'?  On a project in
progress I rely on 'runGet' to toss out padding bytes for me.

-Antoine


More information about the Haskell-Cafe mailing list