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.
bracketUnsafe :: MonadCatch m => m b -> (b -> m c) -> (b -> Stream m a) -> Stream m astreamly-core Streamly.Internal.Data.Stream Like bracket but with following differences:
- alloc action m b runs with async exceptions enabled
- cleanup action b -> m c won't run if the stream is garbage collected after partial evaluation.
- has slightly better performance than bracketIO.
-
streamly-core Streamly.Internal.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)
-
streamly-core Streamly.Internal.Data.Unfold Run the alloc action a -> m c with async exceptions disabled but keeping blocking operations interruptible (see mask). Use the output c as input to Unfold m c b to generate an output stream. c is usually a resource under the state of monad m, e.g. a file handle, that requires a cleanup after use. The cleanup action c -> m d, runs whenever the stream ends normally, due to a sync or async exception or if it gets garbage collected after a partial lazy evaluation. bracket 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. See also: bracket_, gbracket Inhibits stream fusion Pre-release
bracket_ :: MonadCatch m => (a -> m c) -> (c -> m d) -> Unfold m c b -> Unfold m a bstreamly-core Streamly.Internal.Data.Unfold Like bracketIO but with following differences:
- alloc action a -> m c runs with async exceptions enabled
- cleanup action c -> m d won't run if the stream is garbage collected after partial evaluation.
brackets :: MyParser a -> MyParser atidal-core Sound.Tidal.ParseBP No documentation available.
bracketed :: Parser e b -> Parser e b -> Parser e a -> Parser e aweb-rep Web.Rep.Internal.FlatParse Parser bracketed by two other parsers.
>>> runParser (bracketed ($(char '[')) ($(char ']')) (many (satisfy (/= ']')))) "[bracketed]" OK "bracketed" ""
bracketedSB :: Parser e [Char]web-rep Web.Rep.Internal.FlatParse Parser bracketed by square brackets.
>>> runParser bracketedSB "[bracketed]" OK "bracketed" ""
-
Agda Agda.Compiler.JS.Pretty No documentation available.
-
Agda Agda.Syntax.Common.Pretty No documentation available.
brackets :: Functor m => m Doc -> m DocAgda Agda.TypeChecking.Pretty No documentation available.