
5 Sep
2010
5 Sep
'10
2:16 a.m.
If however something goes wrong, and prs fails, the whole function fails (error is thrown). Since [a] (result of decoding) is a lazy list, actual exception may be thrown at any moment the list is being processed, and exception handler may not be properly set.
True -> return (reverse a) False -> many' (s:a)
Lazy lists are built in left to right order, but Yours is right to left.
Is there any way to catch/detect failures inside the Get monad? lookAhead, lookAheadM, etc