A recent cabal install upgraded my version of transformers from 0.3.0.0 to 0.4.1.0. With this upgrade came depreciation warnings about ErrorT.
The documentation is not clear is this just a renaming or is there a functional change? Why was this change made?
There is a functional change. ErrorT
demands that the e
type be a member of the Error
type class—for example, consider its Monad
instance constraints. This is fairly arbitrary and certainly not needed for the functionality of ErrorT
.
ExceptT
lifts this restriction.
The renaming was introduced in order to create a more smooth upgrade pathway. People who currently use and depend upon the Error
constraint in their ErrorT
stacks should not have to change code. People who'd like to use the strictly more general ExceptT
module can freely choose to do so. At some point the ErrorT
module may be removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With