Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. bracketInputEcho :: IO a -> IO a

    echo System.IO.Echo.Internal

    Save the terminal's current input EchoState, perform a computation, restore the saved EchoState, and then return the result of the computation.

    bracketInputEcho action = bracket getInputEchoState setInputEchoState (const action)
    

  2. brackets :: Parser a -> Parser a

    graphql Language.GraphQL.AST.Lexer

    Parser for an expression between "[" and "]".

  3. brackets :: ParserV v a -> ParserV v a

    liquid-fixpoint Language.Fixpoint.Parse

    Parser that consumes the given symbol. The difference with reservedOp is that the given symbol is seen as a token of its own, so the next character that follows does not matter. symbol :: String -> Parser String symbol x = L.symbol spaces (string x)

  4. brackets :: Doc -> Doc

    liquid-fixpoint Text.PrettyPrint.HughesPJ.Compat

    No documentation available.

  5. brackets :: IsLine doc => doc -> doc

    liquidhaskell-boot Liquid.GHC.API

    No documentation available.

  6. bracketOnError :: MonadPeelIO m => m a -> (a -> m b) -> (a -> m c) -> m c

    monad-peel Control.Exception.Peel

    Generalized version of bracketOnError.

  7. bracket_ :: MonadPeelIO m => m a -> m b -> m c -> m c

    monad-peel Control.Exception.Peel

    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.

  8. bracketIO :: forall (m :: Type -> Type) b c a . (MonadIO m, MonadCatch m) => IO b -> (b -> IO c) -> (b -> Stream m a) -> Stream m a

    streamly-core Streamly.Data.Stream

    Run the alloc action IO b with async exceptions disabled but keeping blocking operations interruptible (see mask). Use the output b of the IO action as input to the function b -> Stream m a to generate an output stream. b is usually a resource under the IO monad, e.g. a file handle, that requires a cleanup after use. The cleanup action b -> IO c, runs whenever (1) the stream ends normally, (2) due to a sync or async exception or, (3) if it gets garbage collected after a partial lazy evaluation. The exception is not caught, it is rethrown. bracketIO only guarantees that the cleanup action runs, and it runs with async exceptions enabled. The action must ensure that it can successfully cleanup the resource in the face of sync or async exceptions. When the stream ends normally or on a sync exception, cleanup action runs immediately in the current thread context, whereas in other cases it runs in the GC context, therefore, cleanup may be delayed until the GC gets to run. An example where GC based cleanup happens is when a stream is being folded but the fold terminates without draining the entire stream or if the consumer of the stream encounters an exception. Observes exceptions only in the stream generation, and not in stream consumers. See also: bracketUnsafe Inhibits stream fusion

  9. bracketIO3 :: forall (m :: Type -> Type) b c d e a . (MonadIO m, MonadCatch m) => IO b -> (b -> IO c) -> (b -> IO d) -> (b -> IO e) -> (b -> Stream m a) -> Stream m a

    streamly-core Streamly.Data.Stream

    Like bracketIO but can use 3 separate cleanup actions depending on the mode of termination:

    1. When the stream stops normally
    2. When the stream is garbage collected
    3. When the stream encounters an exception
    bracketIO3 before onStop onGC onException action runs action using the result of before. If the stream stops, onStop action is executed, if the stream is abandoned onGC is executed, if the stream encounters an exception onException is executed. The exception is not caught, it is rethrown. Inhibits stream fusion Pre-release

  10. bracketIO :: forall (m :: Type -> Type) b c a . (MonadIO m, MonadCatch m) => IO b -> (b -> IO c) -> (b -> StreamK m a) -> StreamK m a

    streamly-core Streamly.Data.StreamK

    Like Streamly.Data.Stream.bracketIO but with one significant difference, this function observes exceptions from the consumer of the stream as well. Therefore, it cleans up the resource promptly when the consumer encounters an exception. You can also convert StreamK to Stream and use resource handling from Stream module:

    >>> bracketIO bef aft bet = StreamK.fromStream $ Stream.bracketIO bef aft (StreamK.toStream . bet)
    

Page 15 of many | Previous | Next