[Haskell-cafe] How to catch exception within the Get monad (the Binary package)

Alexey Khudyakov alexey.skladnoy at gmail.com
Tue Sep 7 17:49:13 EDT 2010

On 07.09.2010 20:51, Henning Thielemann wrote:
> This solution looks very ugly to me. Catching 'error's is debugging, but
> parser failure is kind of exception handling. I guess, the errors you
> want to catch are caused by non-supported fail method, right? Can't you
> use a monad transformer like explicit-exception:Synchronous.Exception or
> transformers:ErrorT around the Binary parser?
ErrorT is useless here since it cannot intercept calls to 'error'. Same 
should be the case with ExcepcionalT. There is also performance penalty

More information about the Haskell-Cafe mailing list