[Haskell-cafe] How to catch exception within the Get monad (the
stephen.tetley at gmail.com
Sun Sep 5 03:39:32 EDT 2010
Also any half decent binary format should tell you how long the list
is *before* you parse it, either:
1) How many elements it has - for this you just need a counting
version of the many combinator.
2) The length of bytes that the flattened list takes. In this case the
repeating combinator has to test length remaining before deciding
whether to parse the next element.
Neither should need exceptions.
More information about the Haskell-Cafe