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.

  1. bracketSetupFunc :: IO resource -> (resource -> IO r) -> SetupFunc resource

    sydtest Test.Syd.Def.SetupFunc

    Turn the arguments that you would normally give to bracket into a SetupFunc.

  2. brackets :: Doc -> Doc

    ansi-wl-pprint Text.PrettyPrint.ANSI.Leijen

    No documentation available.

  3. brackets :: TokenParsing m => m a -> m a

    parsers Text.Parser.Token

    Token parser brackets p parses p enclosed in brackets ('[' and ']'), returning the value of p.

  4. bracketT :: forall (m :: Type -> Type) e h a . Monad m => ExceptionalT e m h -> (h -> ExceptionalT e m ()) -> (h -> ExceptionalT e m a) -> ExceptionalT e m a

    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.

  5. bracket_ :: Process a -> Process b -> Process c -> Process c

    distributed-process Control.Distributed.Process

    Deprecated: Use Control.Monad.Catch.bracket_ instead

  6. bracket_ :: Process a -> Process b -> Process c -> Process c

    distributed-process Control.Distributed.Process.Internal.Primitives

    Deprecated: Use Control.Monad.Catch.bracket_ instead

  7. brackets :: HasChars a => Doc a -> Doc a

    doclayout Text.DocLayout

    Puts a Doc in square brackets.

  8. bracketSnap :: IO a -> (a -> IO b) -> (a -> Snap c) -> Snap c

    snap-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.

    1. Normal completion
    2. Short-circuit completion, either from calling fail or finishWith
    3. An exception being thrown.
    Example:
    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
    

  9. bracketSnap :: IO a -> (a -> IO b) -> (a -> Snap c) -> Snap c

    snap-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.

    1. Normal completion
    2. Short-circuit completion, either from calling fail or finishWith
    3. An exception being thrown.
    Example:
    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
    

  10. bracketOnError :: forall (r :: EffectRow) a c b . Member Resource r => Sem r a -> (a -> Sem r c) -> (a -> Sem r b) -> Sem r b

    polysemy Polysemy.Resource

    Allocate a resource, use it, and clean it up afterwards if an error occurred.

Page 9 of many | Previous | Next