import UnliftIO.Exception (catch, throwIO)
removeAnnotationsFromExceptions :: (MonadUnliftIO m) => m a -> m a
removeAnnotationsFromExceptions action =
action `catch` \(AnnotatedException _ exn) ->
throwIO exn
Would be good to expose this for end users. Tbh I often find myself wanting, like,
mapException :: (Exception e, Exception e') => (e -> e') -> IO a -> IO a
traverseException :: (Exception e, Exception e') => (e -> IO e') -> IO a -> IO a
Would be good to expose this for end users. Tbh I often find myself wanting, like,