try package:annotated-exception

Like try, but can also handle an AnnotatedException or the underlying value. Useful when you want to try to catch a type of exception, but you may not care about the Annotations that it may or may not have. Example:
Left exn <- try $ throw (AnnotatedException [] TestException)
exn == TestException
Left exn <- try $ throw TestException
exn == AnnotatedException [] TestException
Like try but uses MonadUnliftIO instead of MonadCatch.
Like catch, but always returns a AnnotatedException.
Like tryAnnotated but uses MonadUnliftIO instead of MonadCatch.
Attempt to cast the underlying value out of an Annotation. Returns the original Annotation if the cast isn't right.
Attempt to cast list of Annotation into the given type. Any Annotation that is not in that form is left untouched.