Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mappedException :: (Exception e, Exception e') => Setter s s e e'lens Control.Exception.Lens This Setter can be used to purely map over the Exceptions an arbitrary expression might throw; it is a variant of mapException in the same way that mapped is a variant of fmap.
'mapException' ≡ 'over' 'mappedException'
This view that every Haskell expression can be regarded as carrying a bag of Exceptions is detailed in “A Semantics for Imprecise Exceptions” by Peyton Jones & al. at PLDI ’99. The following maps failed assertions to arithmetic overflow:>>> handling _Overflow (\_ -> return "caught") $ assert False (return "uncaught") & mappedException %~ \ (AssertionFailed _) -> Overflow "caught"
mappedException' :: Exception e' => Setter s s SomeException e'lens Control.Exception.Lens This is a type restricted version of mappedException, which avoids the type ambiguity in the input Exception when using set. The following maps any exception to arithmetic overflow:
>>> handling _Overflow (\_ -> return "caught") $ assert False (return "uncaught") & mappedException' .~ Overflow "caught"
-
lens Control.Lens.Internal.Exception There was an Exception caused by abusing the internals of a Handler.
HandlingException :: HandlingExceptionlens Control.Lens.Internal.Exception No documentation available.
-
resourcet Control.Monad.Trans.Resource Thrown when one or more cleanup functions themselves throw an exception during cleanup.
-
resourcet Control.Monad.Trans.Resource No documentation available.
rceFirstCleanupException :: ResourceCleanupException -> !SomeExceptionresourcet Control.Monad.Trans.Resource The first cleanup exception. We keep this separate from rceOtherCleanupExceptions to prove that there's at least one (i.e., a non-empty list).
rceOriginalException :: ResourceCleanupException -> !Maybe SomeExceptionresourcet Control.Monad.Trans.Resource If the ResourceT block exited due to an exception, this is that exception.
rceOtherCleanupExceptions :: ResourceCleanupException -> ![SomeException]resourcet Control.Monad.Trans.Resource All other exceptions in cleanups.
-
resourcet Control.Monad.Trans.Resource.Internal Thrown when one or more cleanup functions themselves throw an exception during cleanup.