DynamicException
and throwDyn
and throwDynTo
used to be in the Control.OldException
module. Now that OldException
is gone for good, packages that relied on it are broken.
Is there an equivalent of DynamicException
in the ExtensibleException
package or elsewhere? I'd like to get away with minimal changes.
Context: I'm trying to build lambdabot with GHC 7.6.1. The broken file is Signal.hs
in lambdabot-utils
.
Update Is there some kind of guide for porting old exceptions code to new extensible exceptions? lambdabot
uses OldException
in several places, a quick fix doesn't seem possible.
The equivalents of these functions in the new Control.Exception
are simply throw
, throwTo
and catch
, as Control.Exception
supports dynamic exceptions by default.
The main difference between the old interface and the new one is that these functions have an Exception
constraint rather than Typeable
. However, in most cases the default implementation is good enough, so you simply need to declare Exception
instances for the types you want to use, e.g.
instance Exception Foo
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