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.Exceptionare simplythrow,throwToandcatch, asControl.Exceptionsupports dynamic exceptions by default.The main difference between the old interface and the new one is that these functions have an
Exceptionconstraint rather thanTypeable. However, in most cases the default implementation is good enough, so you simply need to declareExceptioninstances for the types you want to use, e.g.