Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
bracketOnError :: (HasCallStack, MonadMask m) => m a -> (a -> m b) -> (a -> m c) -> m csafe-exceptions Control.Exception.Safe Async safe version of bracketOnError
bracketOnError_ :: (HasCallStack, MonadMask m) => m a -> m b -> m c -> m csafe-exceptions Control.Exception.Safe A variant of bracketOnError where the return value from the first computation is not required.
-
safe-exceptions Control.Exception.Safe Async safe version of bracket with access to the exception in the cleanup action.
bracket_ :: (HasCallStack, MonadMask m) => m a -> m b -> m c -> m csafe-exceptions Control.Exception.Safe Async safe version of bracket_
bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO cghc GHC.Utils.Exception No documentation available.
bracket_ :: IO a -> IO b -> IO c -> IO cghc GHC.Utils.Exception No documentation available.
brackets :: IsLine doc => doc -> docghc GHC.Utils.Outputable No documentation available.
-
ghc GHC.Utils.Ppr No documentation available.
bracketOnError :: MonadBaseControl IO m => m a -> (a -> m b) -> (a -> m c) -> m clifted-base Control.Exception.Lifted Generalized version of bracketOnError. Note:
- When the "acquire" or "release" computations throw exceptions any monadic side effects in m will be discarded.
- When the "in-between" computation throws an exception any monadic side effects in m produced by that computation will be discarded but the side effects of the "acquire" computation will be retained.
- Also, any monadic side effects in m of the "release" computation will be discarded; it is run only for its side effects in IO.
liftBaseOp (bracketOnError acquire release)
bracket_ :: MonadBaseControl IO m => m a -> m b -> m c -> m clifted-base Control.Exception.Lifted Generalized version of bracket_. Note any monadic side effects in m of both the "acquire" and "release" computations will be discarded. To keep the monadic side effects of the "acquire" computation, use bracket with constant functions instead. Note that when your acquire and release computations are of type IO it will be more efficient to write:
liftBaseOp_ (bracket_ acquire release)