Error -> Except migration

Ganesh Sittampalam ganesh at earth.li
Tue Mar 3 07:32:09 UTC 2015


Hi,

In recent versions of transformers, 'ErrorT' has been deprecated in
favour of 'ExceptT':

https://hackage.haskell.org/package/transformers-0.4.2.0/docs/Control-Monad-Trans-Error.html

This doesn't seem like a trivial like-for-like replacement since the
implementation of 'fail' is different - in ErrorT it produces an
exception within the ErrorT itself, and in ExceptT it just calls fail in
the underlying monad.

Is there any guidance or simple trick to find if a program is relying on
the old behaviour? Otherwise migrating could be rather
painful/dangerous, particularly as tests often don't cover exceptional
cases well.

I've spent a while searching for past discussion of the change, but
haven't found anything, so please do point me at anything relevant if
this has already been discussed.

Cheers,

Ganesh


More information about the Libraries mailing list