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.
bracketSetupFunc :: IO resource -> (resource -> IO r) -> SetupFunc resourcesydtest Test.Syd.Def.SetupFunc Turn the arguments that you would normally give to bracket into a SetupFunc.
-
ansi-wl-pprint Text.PrettyPrint.ANSI.Leijen No documentation available.
brackets :: TokenParsing m => m a -> m aparsers Text.Parser.Token Token parser brackets p parses p enclosed in brackets ('[' and ']'), returning the value of p.
-
explicit-exception Control.Monad.Exception.Synchronous If the enclosed monad has custom exception facilities, they could skip the cleanup code. Make sure, that this cannot happen by choosing an appropriate monad.
bracket_ :: Process a -> Process b -> Process c -> Process cdistributed-process Control.Distributed.Process Deprecated: Use Control.Monad.Catch.bracket_ instead
bracket_ :: Process a -> Process b -> Process c -> Process cdistributed-process Control.Distributed.Process.Internal.Primitives Deprecated: Use Control.Monad.Catch.bracket_ instead
brackets :: HasChars a => Doc a -> Doc adoclayout Text.DocLayout Puts a Doc in square brackets.
bracketSnap :: IO a -> (a -> IO b) -> (a -> Snap c) -> Snap csnap-core Snap.Core This function brackets a Snap action in resource acquisition and release. This is provided because MonadCatchIO's bracket function doesn't work properly in the case of a short-circuit return from the action being bracketed. In order to prevent confusion regarding the effects of the aquisition and release actions on the Snap state, this function doesn't accept Snap actions for the acquire or release actions. This function will run the release action in all cases where the acquire action succeeded. This includes the following behaviors from the bracketed Snap action.
- Normal completion
- Short-circuit completion, either from calling fail or finishWith
- An exception being thrown.
ghci> :set -XOverloadedStrings ghci> import qualified Data.Map as M ghci> import qualified Snap.Test as T ghci> let br = bracketSnap (putStrLn "before") (const $ putStrLn "after") ghci> T.runHandler (T.get "/" M.empty) (br $ const $ writeBS "OK") before after HTTP/1.1 200 OK server: Snap/test date: Thu, 07 Aug 2014 18:41:50 GMT OK
bracketSnap :: IO a -> (a -> IO b) -> (a -> Snap c) -> Snap csnap-core Snap.Internal.Core This function brackets a Snap action in resource acquisition and release. This is provided because MonadCatchIO's bracket function doesn't work properly in the case of a short-circuit return from the action being bracketed. In order to prevent confusion regarding the effects of the aquisition and release actions on the Snap state, this function doesn't accept Snap actions for the acquire or release actions. This function will run the release action in all cases where the acquire action succeeded. This includes the following behaviors from the bracketed Snap action.
- Normal completion
- Short-circuit completion, either from calling fail or finishWith
- An exception being thrown.
ghci> :set -XOverloadedStrings ghci> import qualified Data.Map as M ghci> import qualified Snap.Test as T ghci> let br = bracketSnap (putStrLn "before") (const $ putStrLn "after") ghci> T.runHandler (T.get "/" M.empty) (br $ const $ writeBS "OK") before after HTTP/1.1 200 OK server: Snap/test date: Thu, 07 Aug 2014 18:41:50 GMT OK
-
polysemy Polysemy.Resource Allocate a resource, use it, and clean it up afterwards if an error occurred.