RIO: exported symbols usage examples

Symbols

  • ++ No usage example found for this symbol :( Collapse [-]
    seq No usage example found for this symbol :( Collapse [-]
    filter See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.split
      , Data.ByteString.Lazy.splitWith
    
      -- * Predicates
      , Data.ByteString.Lazy.isPrefixOf
      , Data.ByteString.Lazy.isSuffixOf
    
      -- * Search ByteStrings
      -- ** Searching by equality
      , Data.ByteString.Lazy.elem
      , Data.ByteString.Lazy.notElem
    
      -- ** Searching with a predicate
      , Data.ByteString.Lazy.find
      , Data.ByteString.Lazy.filter
      , Data.ByteString.Lazy.partition
    
      -- * Indexing ByteStrings
      , Data.ByteString.Lazy.index
      , Data.ByteString.Lazy.elemIndex
    

    zip See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.find
      , Data.ByteString.Lazy.filter
      , Data.ByteString.Lazy.partition
    
      -- * Indexing ByteStrings
      , Data.ByteString.Lazy.index
      , Data.ByteString.Lazy.elemIndex
      , Data.ByteString.Lazy.elemIndexEnd
      , Data.ByteString.Lazy.elemIndices
      , Data.ByteString.Lazy.findIndex
      , Data.ByteString.Lazy.findIndices
      , Data.ByteString.Lazy.count
    
      -- * Zipping and unzipping ByteStrings
      , Data.ByteString.Lazy.zip
      , Data.ByteString.Lazy.zipWith
      , Data.ByteString.Lazy.unzip
    
      -- * Low level conversions
      -- ** Copying ByteStrings
    

    fst No usage example found for this symbol :( Collapse [-]
    snd No usage example found for this symbol :( Collapse [-]
    otherwise No usage example found for this symbol :( Collapse [-]
    assert No usage example found for this symbol :( Collapse [-]
    map See 5 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.foldrChunks
      , Data.ByteString.Lazy.foldlChunks
    
      -- * Basic interface
      , Data.ByteString.Lazy.cons
      , Data.ByteString.Lazy.cons'
      , Data.ByteString.Lazy.snoc
      , Data.ByteString.Lazy.append
      , Data.ByteString.Lazy.uncons
      , Data.ByteString.Lazy.unsnoc
      , Data.ByteString.Lazy.null
      , Data.ByteString.Lazy.length
    
      -- * Transforming ByteStrings
      , Data.ByteString.Lazy.map
      , Data.ByteString.Lazy.reverse
      , Data.ByteString.Lazy.intersperse
      , Data.ByteString.Lazy.intercalate
      , Data.ByteString.Lazy.transpose
    

    Found in Control.Teardown.Internal.Types from the package teardown
              Just err ->
                Pretty.hang 2
                  (Pretty.vsep ["✘"
                                <+> pretty resultDescription
                                <+> Pretty.parens (pretty $ show resultElapsedTime)
                               , "|" <+> pretty (show err) ])
          BranchResult {resultDidFail, resultDescription, resultElapsedTime, resultListing} ->
            let
              symbolDoc = if resultDidFail then "✘" else "✓"
            in
              symbolDoc
              <+> pretty resultDescription
              <+> Pretty.parens (pretty $ show resultElapsedTime)
              <> Pretty.hardline
              <> Pretty.indent 2 (Pretty.align (Pretty.vsep (map pretty resultListing)))
    
    instance Display TeardownResult where
      display = displayShow . pretty
    
    getElapsedTime :: TeardownResult -> NominalDiffTime
    

    Found in Control.Teardown.Internal.Core from the package teardown
    --   for parent and leaf sub-routines from the teardown tree.
    foldTeardownResult
      :: (acc -> Description -> Maybe SomeException -> acc) -- ^ Step function called when the "TeardownResult" is a leaf
      -> ([acc] -> Description -> acc) -- ^ Step function called when the "TeardownResult" is a branch
      -> acc -- ^ Original fold accumulator
      -> TeardownResult -- ^ Result from the "teardown" execution
      -> acc
    foldTeardownResult leafStep branchStep acc disposeResult =
      case disposeResult of
        EmptyResult desc       -> leafStep acc desc Nothing
    
        LeafResult desc _ mErr -> leafStep acc desc mErr
    
        BranchResult desc _ _ results ->
          let result = map (foldTeardownResult leafStep branchStep acc) results
          in  branchStep result desc
    
    -- | Returns number of released resources from a "runTeardown" execution
    toredownCount :: TeardownResult -> Int
    toredownCount =
    

    Found in Control.Teardown.Internal.Core from the package teardown
    concatTeardown :: Description -> [Teardown] -> Teardown
    concatTeardown desc teardownChildren = Teardown $ do
      teardownResults <- mapM (\(Teardown action) -> action) teardownChildren
    
      let elapsed        = sum $ map getElapsedTime teardownResults
    
          teardownFailed = any didTeardownFail teardownResults
    
      return $ BranchResult desc elapsed teardownFailed teardownResults
    
    newDynTeardown :: Description -> IO [TeardownResult] -> Teardown
    newDynTeardown desc action = Teardown $ do
      teardownResults <- action
    
      let elapsed        = sum $ map getElapsedTime teardownResults
    
          teardownFailed = any didTeardownFail teardownResults
    
      return $ BranchResult desc elapsed teardownFailed teardownResults
    

    Found in Control.Teardown.Internal.Core from the package teardown
                  elapsed
                  (either Just (const Nothing) disposeResult0)
    
            writeIORef teardownResultRef (Just disposeResult)
            return disposeResult
          else fromMaybe (emptyTeardownResult desc) <$> readIORef teardownResultRef
    
    -- | Creates a "Teardown" sub-routine that is composed of other smaller
    -- sub-routines. This is ideal for composing the cleanup of an application from
    -- smaller resources allocations that are known beforehand.
    concatTeardown :: Description -> [Teardown] -> Teardown
    concatTeardown desc teardownChildren = Teardown $ do
      teardownResults <- mapM (\(Teardown action) -> action) teardownChildren
    
      let elapsed        = sum $ map getElapsedTime teardownResults
    
          teardownFailed = any didTeardownFail teardownResults
    
      return $ BranchResult desc elapsed teardownFailed teardownResults
    

    $ No usage example found for this symbol :( Collapse [-]
    fromIntegral No usage example found for this symbol :( Collapse [-]
    realToFrac No usage example found for this symbol :( Collapse [-]
    guard No usage example found for this symbol :( Collapse [-]
    join No usage example found for this symbol :( Collapse [-]
    Bounded No usage example found for this symbol :( Collapse [-]
    Enum No usage example found for this symbol :( Collapse [-]
    Eq No usage example found for this symbol :( Collapse [-]
    Floating No usage example found for this symbol :( Collapse [-]
    Fractional No usage example found for this symbol :( Collapse [-]
    Integral No usage example found for this symbol :( Collapse [-]
    Monad No usage example found for this symbol :( Collapse [-]
    Data No usage example found for this symbol :( Collapse [-]
    Functor No usage example found for this symbol :( Collapse [-]
    Num No usage example found for this symbol :( Collapse [-]
    Ord No usage example found for this symbol :( Collapse [-]
    Read No usage example found for this symbol :( Collapse [-]
    Real No usage example found for this symbol :( Collapse [-]
    RealFloat No usage example found for this symbol :( Collapse [-]
    RealFrac No usage example found for this symbol :( Collapse [-]
    Show No usage example found for this symbol :( Collapse [-]
    Typeable No usage example found for this symbol :( Collapse [-]
    IsString No usage example found for this symbol :( Collapse [-]
    Applicative No usage example found for this symbol :( Collapse [-]
    Foldable No usage example found for this symbol :( Collapse [-]
    Traversable No usage example found for this symbol :( Collapse [-]
    Generic No usage example found for this symbol :( Collapse [-]
    Semigroup No usage example found for this symbol :( Collapse [-]
    Monoid No usage example found for this symbol :( Collapse [-]
    Bool No usage example found for this symbol :( Collapse [-]
    Char No usage example found for this symbol :( Collapse [-]
    Double No usage example found for this symbol :( Collapse [-]
    Float No usage example found for this symbol :( Collapse [-]
    Int No usage example found for this symbol :( Collapse [-]
    Int8 No usage example found for this symbol :( Collapse [-]
    Int16 No usage example found for this symbol :( Collapse [-]
    Int32 No usage example found for this symbol :( Collapse [-]
    Int64 No usage example found for this symbol :( Collapse [-]
    Integer No usage example found for this symbol :( Collapse [-]
    Natural No usage example found for this symbol :( Collapse [-]
    Maybe No usage example found for this symbol :( Collapse [-]
    Ordering No usage example found for this symbol :( Collapse [-]
    Rational No usage example found for this symbol :( Collapse [-]
    IO No usage example found for this symbol :( Collapse [-]
    Word No usage example found for this symbol :( Collapse [-]
    Word8 No usage example found for this symbol :( Collapse [-]
    Word16 No usage example found for this symbol :( Collapse [-]
    Word32 No usage example found for this symbol :( Collapse [-]
    Word64 No usage example found for this symbol :( Collapse [-]
    Either No usage example found for this symbol :( Collapse [-]
    CallStack No usage example found for this symbol :( Collapse [-]
    displayBytesUtf8 No usage example found for this symbol :( Collapse [-]
    displayShow See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Types from the package teardown
                                <+> pretty resultDescription
                                <+> Pretty.parens (pretty $ show resultElapsedTime)
                               , "|" <+> pretty (show err) ])
          BranchResult {resultDidFail, resultDescription, resultElapsedTime, resultListing} ->
            let
              symbolDoc = if resultDidFail then "✘" else "✓"
            in
              symbolDoc
              <+> pretty resultDescription
              <+> Pretty.parens (pretty $ show resultElapsedTime)
              <> Pretty.hardline
              <> Pretty.indent 2 (Pretty.align (Pretty.vsep (map pretty resultListing)))
    
    instance Display TeardownResult where
      display = displayShow . pretty
    
    getElapsedTime :: TeardownResult -> NominalDiffTime
    getElapsedTime result =
      case result of
        BranchResult {resultElapsedTime} -> resultElapsedTime
    

    utf8BuilderToLazyText No usage example found for this symbol :( Collapse [-]
    utf8BuilderToText No usage example found for this symbol :( Collapse [-]
    writeFileUtf8Builder No usage example found for this symbol :( Collapse [-]
    Display No usage example found for this symbol :( Collapse [-]
    Utf8Builder No usage example found for this symbol :( Collapse [-]
    Builder No usage example found for this symbol :( Collapse [-]
    IOException No usage example found for this symbol :( Collapse [-]
    String No usage example found for this symbol :( Collapse [-]
    SomeException No usage example found for this symbol :( Collapse [-]
    Text No usage example found for this symbol :( Collapse [-]
    id See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
      foldTeardownResult (\acc _ _ -> acc + 1) (\results _ -> sum results) 0
    {-# INLINE toredownCount #-}
    
    -- | Returns number of sub-routines that threw an exception on execution of
    -- "runTeardown"
    failedToredownCount :: TeardownResult -> Int
    failedToredownCount = foldTeardownResult
      (\acc _ mErr -> acc + maybe 0 (const 1) mErr)
      (\results _ -> sum results)
      0
    
    --------------------------------------------------------------------------------
    
    instance HasTeardown Teardown where
      getTeardown = id
      {-# INLINE getTeardown #-}
    
    -- | Creates a new "Teardown" record from a cleanup "IO ()" sub-routine; the
    -- Teardown API guarantees:
    --
    

    ByteString No usage example found for this symbol :( Collapse [-]
    lenientDecode No usage example found for this symbol :( Collapse [-]
    MonadIO No usage example found for this symbol :( Collapse [-]
    FilePath No usage example found for this symbol :( Collapse [-]
    Handle No usage example found for this symbol :( Collapse [-]
    all See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.reverse
      , Data.ByteString.Lazy.intersperse
      , Data.ByteString.Lazy.intercalate
      , Data.ByteString.Lazy.transpose
    
      -- * Reducing 'ByteString's (folds)
      , Data.ByteString.Lazy.foldl
      , Data.ByteString.Lazy.foldl'
      , Data.ByteString.Lazy.foldr
    
      -- ** Special folds
      , Data.ByteString.Lazy.concat
      , Data.ByteString.Lazy.concatMap
      , Data.ByteString.Lazy.any
      , Data.ByteString.Lazy.all
    
      -- * Building ByteStrings
      -- ** Scans
      , Data.ByteString.Lazy.scanl
    

    and No usage example found for this symbol :( Collapse [-]
    any See 3 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.map
      , Data.ByteString.Lazy.reverse
      , Data.ByteString.Lazy.intersperse
      , Data.ByteString.Lazy.intercalate
      , Data.ByteString.Lazy.transpose
    
      -- * Reducing 'ByteString's (folds)
      , Data.ByteString.Lazy.foldl
      , Data.ByteString.Lazy.foldl'
      , Data.ByteString.Lazy.foldr
    
      -- ** Special folds
      , Data.ByteString.Lazy.concat
      , Data.ByteString.Lazy.concatMap
      , Data.ByteString.Lazy.any
      , Data.ByteString.Lazy.all
    
      -- * Building ByteStrings
      -- ** Scans
      , Data.ByteString.Lazy.scanl
    

    Found in Control.Teardown.Internal.Core from the package teardown
      teardownResults <- mapM (\(Teardown action) -> action) teardownChildren
    
      let elapsed        = sum $ map getElapsedTime teardownResults
    
          teardownFailed = any didTeardownFail teardownResults
    
      return $ BranchResult desc elapsed teardownFailed teardownResults
    
    newDynTeardown :: Description -> IO [TeardownResult] -> Teardown
    newDynTeardown desc action = Teardown $ do
      teardownResults <- action
    
      let elapsed        = sum $ map getElapsedTime teardownResults
    
          teardownFailed = any didTeardownFail teardownResults
    
      return $ BranchResult desc elapsed teardownFailed teardownResults
    
    -- | Creates a stub "Teardown" sub-routine, normally used when a contract
    --  expects a teardown return but there is no allocation being made
    

    Found in Control.Teardown.Internal.Core from the package teardown
            writeIORef teardownResultRef (Just disposeResult)
            return disposeResult
          else fromMaybe (emptyTeardownResult desc) <$> readIORef teardownResultRef
    
    -- | Creates a "Teardown" sub-routine that is composed of other smaller
    -- sub-routines. This is ideal for composing the cleanup of an application from
    -- smaller resources allocations that are known beforehand.
    concatTeardown :: Description -> [Teardown] -> Teardown
    concatTeardown desc teardownChildren = Teardown $ do
      teardownResults <- mapM (\(Teardown action) -> action) teardownChildren
    
      let elapsed        = sum $ map getElapsedTime teardownResults
    
          teardownFailed = any didTeardownFail teardownResults
    
      return $ BranchResult desc elapsed teardownFailed teardownResults
    
    newDynTeardown :: Description -> IO [TeardownResult] -> Teardown
    newDynTeardown desc action = Teardown $ do
    

    asum No usage example found for this symbol :( Collapse [-]
    concat See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      -- * Transforming ByteStrings
      , Data.ByteString.Lazy.map
      , Data.ByteString.Lazy.reverse
      , Data.ByteString.Lazy.intersperse
      , Data.ByteString.Lazy.intercalate
      , Data.ByteString.Lazy.transpose
    
      -- * Reducing 'ByteString's (folds)
      , Data.ByteString.Lazy.foldl
      , Data.ByteString.Lazy.foldl'
      , Data.ByteString.Lazy.foldr
    
      -- ** Special folds
      , Data.ByteString.Lazy.concat
      , Data.ByteString.Lazy.concatMap
      , Data.ByteString.Lazy.any
      , Data.ByteString.Lazy.all
    
      -- * Building ByteStrings
    

    concatMap See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      -- * Transforming ByteStrings
      , Data.ByteString.Lazy.map
      , Data.ByteString.Lazy.reverse
      , Data.ByteString.Lazy.intersperse
      , Data.ByteString.Lazy.intercalate
      , Data.ByteString.Lazy.transpose
    
      -- * Reducing 'ByteString's (folds)
      , Data.ByteString.Lazy.foldl
      , Data.ByteString.Lazy.foldl'
      , Data.ByteString.Lazy.foldr
    
      -- ** Special folds
      , Data.ByteString.Lazy.concat
      , Data.ByteString.Lazy.concatMap
      , Data.ByteString.Lazy.any
      , Data.ByteString.Lazy.all
    
      -- * Building ByteStrings
      -- ** Scans
    

    forM_ No usage example found for this symbol :( Collapse [-]
    for_ No usage example found for this symbol :( Collapse [-]
    mapM_ No usage example found for this symbol :( Collapse [-]
    msum No usage example found for this symbol :( Collapse [-]
    notElem See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.stripPrefix
      , Data.ByteString.Lazy.stripSuffix
    
      -- ** Breaking into many substrings
      , Data.ByteString.Lazy.split
      , Data.ByteString.Lazy.splitWith
    
      -- * Predicates
      , Data.ByteString.Lazy.isPrefixOf
      , Data.ByteString.Lazy.isSuffixOf
    
      -- * Search ByteStrings
      -- ** Searching by equality
      , Data.ByteString.Lazy.elem
      , Data.ByteString.Lazy.notElem
    
      -- ** Searching with a predicate
      , Data.ByteString.Lazy.find
      , Data.ByteString.Lazy.filter
      , Data.ByteString.Lazy.partition
    

    or No usage example found for this symbol :( Collapse [-]
    sequenceA_ No usage example found for this symbol :( Collapse [-]
    sequence_ No usage example found for this symbol :( Collapse [-]
    traverse_ No usage example found for this symbol :( Collapse [-]
    isLeft No usage example found for this symbol :( Collapse [-]
    Proxy No usage example found for this symbol :( Collapse [-]
    Alternative No usage example found for this symbol :( Collapse [-]
    MonadPlus No usage example found for this symbol :( Collapse [-]
    Const No usage example found for this symbol :( Collapse [-]
    Identity No usage example found for this symbol :( Collapse [-]
    maybe See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
        BranchResult desc _ _ results ->
          let result = map (foldTeardownResult leafStep branchStep acc) results
          in  branchStep result desc
    
    -- | Returns number of released resources from a "runTeardown" execution
    toredownCount :: TeardownResult -> Int
    toredownCount =
      foldTeardownResult (\acc _ _ -> acc + 1) (\results _ -> sum results) 0
    {-# INLINE toredownCount #-}
    
    -- | Returns number of sub-routines that threw an exception on execution of
    -- "runTeardown"
    failedToredownCount :: TeardownResult -> Int
    failedToredownCount = foldTeardownResult
      (\acc _ mErr -> acc + maybe 0 (const 1) mErr)
      (\results _ -> sum results)
      0
    
    --------------------------------------------------------------------------------
    

    lines No usage example found for this symbol :( Collapse [-]
    unlines No usage example found for this symbol :( Collapse [-]
    unwords No usage example found for this symbol :( Collapse [-]
    words No usage example found for this symbol :( Collapse [-]
    byteSwap16 No usage example found for this symbol :( Collapse [-]
    byteSwap32 No usage example found for this symbol :( Collapse [-]
    byteSwap64 No usage example found for this symbol :( Collapse [-]
    $! No usage example found for this symbol :( Collapse [-]
    . No usage example found for this symbol :( Collapse [-]
    =<< No usage example found for this symbol :( Collapse [-]
    asTypeOf No usage example found for this symbol :( Collapse [-]
    const See 2 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
        BranchResult desc _ _ results ->
          let result = map (foldTeardownResult leafStep branchStep acc) results
          in  branchStep result desc
    
    -- | Returns number of released resources from a "runTeardown" execution
    toredownCount :: TeardownResult -> Int
    toredownCount =
      foldTeardownResult (\acc _ _ -> acc + 1) (\results _ -> sum results) 0
    {-# INLINE toredownCount #-}
    
    -- | Returns number of sub-routines that threw an exception on execution of
    -- "runTeardown"
    failedToredownCount :: TeardownResult -> Int
    failedToredownCount = foldTeardownResult
      (\acc _ mErr -> acc + maybe 0 (const 1) mErr)
      (\results _ -> sum results)
      0
    
    --------------------------------------------------------------------------------
    

    Found in Control.Teardown.Internal.Core from the package teardown
    newTeardownIO desc disposingAction = do
      teardownResultLock <- newIORef False
      teardownResultRef  <- newIORef Nothing
      return $ Teardown $ do
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    
        if shouldExecute
          then do
            (elapsed, disposeResult0) <- trackExecutionTime (try disposingAction)
            let disposeResult = LeafResult
                  desc
                  elapsed
                  (either Just (const Nothing) disposeResult0)
    
            writeIORef teardownResultRef (Just disposeResult)
            return disposeResult
          else fromMaybe (emptyTeardownResult desc) <$> readIORef teardownResultRef
    

    flip No usage example found for this symbol :( Collapse [-]
    liftA No usage example found for this symbol :( Collapse [-]
    liftA3 No usage example found for this symbol :( Collapse [-]
    liftM No usage example found for this symbol :( Collapse [-]
    liftM2 No usage example found for this symbol :( Collapse [-]
    when No usage example found for this symbol :( Collapse [-]
    error See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Printer from the package teardown
    treeTrunk :: Int -> Int -> Doc ann
    treeTrunk start level = hcat (map (\_ -> "    ") [1 .. start])
      <> hcat (map (\_ -> "   |") [start .. level - 1])
    
    -- | Renders an ASCII Tree with the "TeardownResult" of a "Teardown" sub-routine
    -- execution
    prettyTeardownResult :: TeardownResult -> Doc ann
    prettyTeardownResult result = render 0 0 result <> hardline
     where
      renderError start level (SomeException err) =
        let
          (fstErrLine, errLines) = case Text.lines (tshow err) of
            [] ->
              error "Expecting reported error to have a line of content, got none"
    
            (fstErrLine' : errLines') -> (fstErrLine', errLines')
    
          errorReport =
            treeTrunk (start - 1) (level + 1)
    

    undefined No usage example found for this symbol :( Collapse [-]
    && No usage example found for this symbol :( Collapse [-]
    not No usage example found for this symbol :( Collapse [-]
    || No usage example found for this symbol :( Collapse [-]
    Exception No usage example found for this symbol :( Collapse [-]
    ExitCode No usage example found for this symbol :( Collapse [-]
    SomeAsyncException No usage example found for this symbol :( Collapse [-]
    IOMode No usage example found for this symbol :( Collapse [-]
    ^ No usage example found for this symbol :( Collapse [-]
    ^^ No usage example found for this symbol :( Collapse [-]
    even No usage example found for this symbol :( Collapse [-]
    gcd No usage example found for this symbol :( Collapse [-]
    lcm No usage example found for this symbol :( Collapse [-]
    odd No usage example found for this symbol :( Collapse [-]
    takeWhile See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      -- ** Infinite ByteStrings
      , Data.ByteString.Lazy.repeat
      , Data.ByteString.Lazy.replicate
      , Data.ByteString.Lazy.cycle
      , Data.ByteString.Lazy.iterate
    
      -- ** Unfolding ByteStrings
      , Data.ByteString.Lazy.unfoldr
    
      -- * Substrings
      -- ** Breaking strings
      , Data.ByteString.Lazy.take
      , Data.ByteString.Lazy.drop
      , Data.ByteString.Lazy.splitAt
      , Data.ByteString.Lazy.takeWhile
      , Data.ByteString.Lazy.dropWhile
      , Data.ByteString.Lazy.span
      , Data.ByteString.Lazy.break
      , Data.ByteString.Lazy.group
      , Data.ByteString.Lazy.groupBy
    

    either See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
    newTeardownIO desc disposingAction = do
      teardownResultLock <- newIORef False
      teardownResultRef  <- newIORef Nothing
      return $ Teardown $ do
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    
        if shouldExecute
          then do
            (elapsed, disposeResult0) <- trackExecutionTime (try disposingAction)
            let disposeResult = LeafResult
                  desc
                  elapsed
                  (either Just (const Nothing) disposeResult0)
    
            writeIORef teardownResultRef (Just disposeResult)
            return disposeResult
          else fromMaybe (emptyTeardownResult desc) <$> readIORef teardownResultRef
    

    <$> No usage example found for this symbol :( Collapse [-]
    curry No usage example found for this symbol :( Collapse [-]
    uncurry See 2 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
    -- deprecated; execute newTeardown for every resource you allocate.
    --
    -- NOTE: The @IO ()@ sub-routines given are going to be executed in reverse
    -- order at teardown time.
    --
    -- Since 0.4.1.0
    #if MIN_VERSION_base(4,11,0)
    instance Ty.TypeError ('Ty.Text "DEPRECATED: Execute a 'newTeardown' call per allocated resource")
      => IResource [(Text, IO ())] where
      newTeardown desc actionList =
        concatTeardown desc <$> mapM (uncurry newTeardown) actionList
    #else
    instance IResource [(Text, IO ())] where
      newTeardown desc actionList =
        concatTeardown desc <$> mapM (uncurry newTeardown) actionList
    #endif
    
    -- | Wraps an existing "Teardown" record; the wrapper "Teardown" record represents
    -- a "parent resource" on the "TeardownResult"
    instance IResource Teardown where
    

    Found in Control.Teardown.Internal.Core from the package teardown
    -- sub-routines (creating a Teardown record for each).
    --
    -- WARNING: This function assumes you are creating many sub-resources at once;
    -- this approach has a major risk of leaking resources, and that is why is
    -- deprecated; execute newTeardown for every resource you allocate.
    --
    -- NOTE: The @IO ()@ sub-routines given are going to be executed in reverse
    -- order at teardown time.
    --
    -- Since 0.4.1.0
    #if MIN_VERSION_base(4,11,0)
    instance Ty.TypeError ('Ty.Text "DEPRECATED: Execute a 'newTeardown' call per allocated resource")
      => IResource [(Text, IO ())] where
      newTeardown desc actionList =
        concatTeardown desc <$> mapM (uncurry newTeardown) actionList
    #else
    instance IResource [(Text, IO ())] where
      newTeardown desc actionList =
        concatTeardown desc <$> mapM (uncurry newTeardown) actionList
    #endif
    

    break See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.cycle
      , Data.ByteString.Lazy.iterate
    
      -- ** Unfolding ByteStrings
      , Data.ByteString.Lazy.unfoldr
    
      -- * Substrings
      -- ** Breaking strings
      , Data.ByteString.Lazy.take
      , Data.ByteString.Lazy.drop
      , Data.ByteString.Lazy.splitAt
      , Data.ByteString.Lazy.takeWhile
      , Data.ByteString.Lazy.dropWhile
      , Data.ByteString.Lazy.span
      , Data.ByteString.Lazy.break
      , Data.ByteString.Lazy.group
      , Data.ByteString.Lazy.groupBy
      , Data.ByteString.Lazy.inits
      , Data.ByteString.Lazy.tails
      , Data.ByteString.Lazy.stripPrefix
    

    drop See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.mapAccumR
    
      -- ** Infinite ByteStrings
      , Data.ByteString.Lazy.repeat
      , Data.ByteString.Lazy.replicate
      , Data.ByteString.Lazy.cycle
      , Data.ByteString.Lazy.iterate
    
      -- ** Unfolding ByteStrings
      , Data.ByteString.Lazy.unfoldr
    
      -- * Substrings
      -- ** Breaking strings
      , Data.ByteString.Lazy.take
      , Data.ByteString.Lazy.drop
      , Data.ByteString.Lazy.splitAt
      , Data.ByteString.Lazy.takeWhile
      , Data.ByteString.Lazy.dropWhile
      , Data.ByteString.Lazy.span
      , Data.ByteString.Lazy.break
    

    dropWhile See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.repeat
      , Data.ByteString.Lazy.replicate
      , Data.ByteString.Lazy.cycle
      , Data.ByteString.Lazy.iterate
    
      -- ** Unfolding ByteStrings
      , Data.ByteString.Lazy.unfoldr
    
      -- * Substrings
      -- ** Breaking strings
      , Data.ByteString.Lazy.take
      , Data.ByteString.Lazy.drop
      , Data.ByteString.Lazy.splitAt
      , Data.ByteString.Lazy.takeWhile
      , Data.ByteString.Lazy.dropWhile
      , Data.ByteString.Lazy.span
      , Data.ByteString.Lazy.break
      , Data.ByteString.Lazy.group
      , Data.ByteString.Lazy.groupBy
      , Data.ByteString.Lazy.inits
    

    lookup No usage example found for this symbol :( Collapse [-]
    replicate See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.concatMap
      , Data.ByteString.Lazy.any
      , Data.ByteString.Lazy.all
    
      -- * Building ByteStrings
      -- ** Scans
      , Data.ByteString.Lazy.scanl
    
      -- ** Accumulating maps
      , Data.ByteString.Lazy.mapAccumL
      , Data.ByteString.Lazy.mapAccumR
    
      -- ** Infinite ByteStrings
      , Data.ByteString.Lazy.repeat
      , Data.ByteString.Lazy.replicate
      , Data.ByteString.Lazy.cycle
      , Data.ByteString.Lazy.iterate
    
      -- ** Unfolding ByteStrings
      , Data.ByteString.Lazy.unfoldr
    

    reverse See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.foldlChunks
    
      -- * Basic interface
      , Data.ByteString.Lazy.cons
      , Data.ByteString.Lazy.cons'
      , Data.ByteString.Lazy.snoc
      , Data.ByteString.Lazy.append
      , Data.ByteString.Lazy.uncons
      , Data.ByteString.Lazy.unsnoc
      , Data.ByteString.Lazy.null
      , Data.ByteString.Lazy.length
    
      -- * Transforming ByteStrings
      , Data.ByteString.Lazy.map
      , Data.ByteString.Lazy.reverse
      , Data.ByteString.Lazy.intersperse
      , Data.ByteString.Lazy.intercalate
      , Data.ByteString.Lazy.transpose
    
      -- * Reducing 'ByteString's (folds)
    

    span See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.replicate
      , Data.ByteString.Lazy.cycle
      , Data.ByteString.Lazy.iterate
    
      -- ** Unfolding ByteStrings
      , Data.ByteString.Lazy.unfoldr
    
      -- * Substrings
      -- ** Breaking strings
      , Data.ByteString.Lazy.take
      , Data.ByteString.Lazy.drop
      , Data.ByteString.Lazy.splitAt
      , Data.ByteString.Lazy.takeWhile
      , Data.ByteString.Lazy.dropWhile
      , Data.ByteString.Lazy.span
      , Data.ByteString.Lazy.break
      , Data.ByteString.Lazy.group
      , Data.ByteString.Lazy.groupBy
      , Data.ByteString.Lazy.inits
      , Data.ByteString.Lazy.tails
    

    take See 1 Occurences [+] Collapse [-]
    Found in RIO.ByteString.Lazy from the package rio
      , Data.ByteString.Lazy.mapAccumL
      , Data.ByteString.Lazy.mapAccumR
    
      -- ** Infinite ByteStrings
      , Data.ByteString.Lazy.repeat
      , Data.ByteString.Lazy.replicate
      , Data.ByteString.Lazy.cycle
      , Data.ByteString.Lazy.iterate
    
      -- ** Unfolding ByteStrings
      , Data.ByteString.Lazy.unfoldr
    
      -- * Substrings
      -- ** Breaking strings
      , Data.ByteString.Lazy.take
      , Data.ByteString.Lazy.drop
      , Data.ByteString.Lazy.splitAt
      , Data.ByteString.Lazy.takeWhile
      , Data.ByteString.Lazy.dropWhile
      , Data.ByteString.Lazy.span
    

    subtract No usage example found for this symbol :( Collapse [-]
    stdin No usage example found for this symbol :( Collapse [-]
    stdout No usage example found for this symbol :( Collapse [-]
    ShortByteString No usage example found for this symbol :( Collapse [-]
    NFData No usage example found for this symbol :( Collapse [-]
    UnicodeException No usage example found for this symbol :( Collapse [-]
    decodeUtf8' No usage example found for this symbol :( Collapse [-]
    decodeUtf8With No usage example found for this symbol :( Collapse [-]
    encodeUtf8 No usage example found for this symbol :( Collapse [-]
    encodeUtf8Builder No usage example found for this symbol :( Collapse [-]
    Storable No usage example found for this symbol :( Collapse [-]
    TMVar No usage example found for this symbol :( Collapse [-]
    STM No usage example found for this symbol :( Collapse [-]
    pollSTM No usage example found for this symbol :( Collapse [-]
    waitAnyCatchSTM No usage example found for this symbol :( Collapse [-]
    waitAnySTM No usage example found for this symbol :( Collapse [-]
    waitBothSTM No usage example found for this symbol :( Collapse [-]
    waitCatchSTM No usage example found for this symbol :( Collapse [-]
    waitEitherCatchSTM No usage example found for this symbol :( Collapse [-]
    waitEitherSTM No usage example found for this symbol :( Collapse [-]
    waitEitherSTM_ No usage example found for this symbol :( Collapse [-]
    waitSTM No usage example found for this symbol :( Collapse [-]
    newTVar No usage example found for this symbol :( Collapse [-]
    readTVar No usage example found for this symbol :( Collapse [-]
    writeTVar No usage example found for this symbol :( Collapse [-]
    stderr No usage example found for this symbol :( Collapse [-]
    isEmptyTBQueue No usage example found for this symbol :( Collapse [-]
    isFullTBQueue No usage example found for this symbol :( Collapse [-]
    newTBQueue No usage example found for this symbol :( Collapse [-]
    peekTBQueue No usage example found for this symbol :( Collapse [-]
    readTBQueue No usage example found for this symbol :( Collapse [-]
    tryPeekTBQueue No usage example found for this symbol :( Collapse [-]
    tryReadTBQueue No usage example found for this symbol :( Collapse [-]
    unGetTBQueue No usage example found for this symbol :( Collapse [-]
    writeTBQueue No usage example found for this symbol :( Collapse [-]
    cloneTChan No usage example found for this symbol :( Collapse [-]
    dupTChan No usage example found for this symbol :( Collapse [-]
    isEmptyTChan No usage example found for this symbol :( Collapse [-]
    newBroadcastTChan No usage example found for this symbol :( Collapse [-]
    newTChan No usage example found for this symbol :( Collapse [-]
    peekTChan No usage example found for this symbol :( Collapse [-]
    readTChan No usage example found for this symbol :( Collapse [-]
    tryPeekTChan No usage example found for this symbol :( Collapse [-]
    tryReadTChan No usage example found for this symbol :( Collapse [-]
    unGetTChan No usage example found for this symbol :( Collapse [-]
    writeTChan No usage example found for this symbol :( Collapse [-]
    isEmptyTMVar No usage example found for this symbol :( Collapse [-]
    newEmptyTMVar No usage example found for this symbol :( Collapse [-]
    newTMVar No usage example found for this symbol :( Collapse [-]
    putTMVar No usage example found for this symbol :( Collapse [-]
    readTMVar No usage example found for this symbol :( Collapse [-]
    swapTMVar No usage example found for this symbol :( Collapse [-]
    takeTMVar No usage example found for this symbol :( Collapse [-]
    tryPutTMVar No usage example found for this symbol :( Collapse [-]
    tryReadTMVar No usage example found for this symbol :( Collapse [-]
    tryTakeTMVar No usage example found for this symbol :( Collapse [-]
    isEmptyTQueue No usage example found for this symbol :( Collapse [-]
    newTQueue No usage example found for this symbol :( Collapse [-]
    peekTQueue No usage example found for this symbol :( Collapse [-]
    readTQueue No usage example found for this symbol :( Collapse [-]
    tryPeekTQueue No usage example found for this symbol :( Collapse [-]
    tryReadTQueue No usage example found for this symbol :( Collapse [-]
    unGetTQueue No usage example found for this symbol :( Collapse [-]
    writeTQueue No usage example found for this symbol :( Collapse [-]
    modifyTVar No usage example found for this symbol :( Collapse [-]
    modifyTVar' No usage example found for this symbol :( Collapse [-]
    swapTVar No usage example found for this symbol :( Collapse [-]
    async No usage example found for this symbol :( Collapse [-]
    asyncBound No usage example found for this symbol :( Collapse [-]
    asyncOn No usage example found for this symbol :( Collapse [-]
    asyncOnWithUnmask No usage example found for this symbol :( Collapse [-]
    asyncWithUnmask No usage example found for this symbol :( Collapse [-]
    cancel No usage example found for this symbol :( Collapse [-]
    cancelWith No usage example found for this symbol :( Collapse [-]
    concurrently No usage example found for this symbol :( Collapse [-]
    concurrently_ No usage example found for this symbol :( Collapse [-]
    forConcurrently No usage example found for this symbol :( Collapse [-]
    forConcurrently_ No usage example found for this symbol :( Collapse [-]
    link No usage example found for this symbol :( Collapse [-]
    link2 No usage example found for this symbol :( Collapse [-]
    mapConcurrently No usage example found for this symbol :( Collapse [-]
    mapConcurrently_ No usage example found for this symbol :( Collapse [-]
    poll No usage example found for this symbol :( Collapse [-]
    race No usage example found for this symbol :( Collapse [-]
    race_ No usage example found for this symbol :( Collapse [-]
    replicateConcurrently No usage example found for this symbol :( Collapse [-]
    replicateConcurrently_ No usage example found for this symbol :( Collapse [-]
    uninterruptibleCancel No usage example found for this symbol :( Collapse [-]
    wait No usage example found for this symbol :( Collapse [-]
    waitAny No usage example found for this symbol :( Collapse [-]
    waitAnyCancel No usage example found for this symbol :( Collapse [-]
    waitAnyCatch No usage example found for this symbol :( Collapse [-]
    waitAnyCatchCancel No usage example found for this symbol :( Collapse [-]
    waitBoth No usage example found for this symbol :( Collapse [-]
    waitCatch No usage example found for this symbol :( Collapse [-]
    waitEither No usage example found for this symbol :( Collapse [-]
    waitEitherCancel No usage example found for this symbol :( Collapse [-]
    waitEitherCatch No usage example found for this symbol :( Collapse [-]
    waitEitherCatchCancel No usage example found for this symbol :( Collapse [-]
    waitEither_ No usage example found for this symbol :( Collapse [-]
    withAsync No usage example found for this symbol :( Collapse [-]
    withAsyncBound No usage example found for this symbol :( Collapse [-]
    withAsyncOn No usage example found for this symbol :( Collapse [-]
    withAsyncOnWithUnmask No usage example found for this symbol :( Collapse [-]
    withAsyncWithUnmask No usage example found for this symbol :( Collapse [-]
    dupChan No usage example found for this symbol :( Collapse [-]
    getChanContents No usage example found for this symbol :( Collapse [-]
    newChan No usage example found for this symbol :( Collapse [-]
    readChan No usage example found for this symbol :( Collapse [-]
    writeChan No usage example found for this symbol :( Collapse [-]
    writeList2Chan No usage example found for this symbol :( Collapse [-]
    bracket No usage example found for this symbol :( Collapse [-]
    bracketOnError No usage example found for this symbol :( Collapse [-]
    bracketOnError_ No usage example found for this symbol :( Collapse [-]
    bracket_ No usage example found for this symbol :( Collapse [-]
    catch No usage example found for this symbol :( Collapse [-]
    catchAny No usage example found for this symbol :( Collapse [-]
    catchAnyDeep No usage example found for this symbol :( Collapse [-]
    catchDeep No usage example found for this symbol :( Collapse [-]
    catchIO No usage example found for this symbol :( Collapse [-]
    catchJust No usage example found for this symbol :( Collapse [-]
    catches No usage example found for this symbol :( Collapse [-]
    catchesDeep No usage example found for this symbol :( Collapse [-]
    evaluate No usage example found for this symbol :( Collapse [-]
    evaluateDeep No usage example found for this symbol :( Collapse [-]
    finally No usage example found for this symbol :( Collapse [-]
    fromEither No usage example found for this symbol :( Collapse [-]
    fromEitherIO No usage example found for this symbol :( Collapse [-]
    fromEitherM No usage example found for this symbol :( Collapse [-]
    handle No usage example found for this symbol :( Collapse [-]
    handleAny No usage example found for this symbol :( Collapse [-]
    handleAnyDeep No usage example found for this symbol :( Collapse [-]
    handleDeep No usage example found for this symbol :( Collapse [-]
    handleIO No usage example found for this symbol :( Collapse [-]
    handleJust No usage example found for this symbol :( Collapse [-]
    impureThrow No usage example found for this symbol :( Collapse [-]
    isAsyncException No usage example found for this symbol :( Collapse [-]
    isSyncException No usage example found for this symbol :( Collapse [-]
    mask No usage example found for this symbol :( Collapse [-]
    mask_ No usage example found for this symbol :( Collapse [-]
    onException No usage example found for this symbol :( Collapse [-]
    pureTry No usage example found for this symbol :( Collapse [-]
    pureTryDeep No usage example found for this symbol :( Collapse [-]
    stringException No usage example found for this symbol :( Collapse [-]
    throwIO No usage example found for this symbol :( Collapse [-]
    throwString No usage example found for this symbol :( Collapse [-]
    throwTo No usage example found for this symbol :( Collapse [-]
    toAsyncException No usage example found for this symbol :( Collapse [-]
    toSyncException No usage example found for this symbol :( Collapse [-]
    try See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
    -- side-effects from this action are guaranteed to be executed only once, and
    -- also it is guaranteed to be thread-safe in the scenario of multiple threads
    -- executing the same teardown procedure.
    newTeardownIO :: Description -> IO () -> IO Teardown
    newTeardownIO desc disposingAction = do
      teardownResultLock <- newIORef False
      teardownResultRef  <- newIORef Nothing
      return $ Teardown $ do
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    
        if shouldExecute
          then do
            (elapsed, disposeResult0) <- trackExecutionTime (try disposingAction)
            let disposeResult = LeafResult
                  desc
                  elapsed
                  (either Just (const Nothing) disposeResult0)
    

    tryAny No usage example found for this symbol :( Collapse [-]
    tryAnyDeep No usage example found for this symbol :( Collapse [-]
    tryDeep No usage example found for this symbol :( Collapse [-]
    tryIO No usage example found for this symbol :( Collapse [-]
    tryJust No usage example found for this symbol :( Collapse [-]
    uninterruptibleMask No usage example found for this symbol :( Collapse [-]
    uninterruptibleMask_ See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
    --  are accumulated on a collection inside a mutable variable (e.g. @IORef@,
    --  @TVar@, etc) and we want to release them
    instance IResource (IO [TeardownResult]) where
      newTeardown desc =
        return . newDynTeardown desc
      {-# INLINE newTeardown #-}
    
    --------------------------------------------------------------------------------
    
    -- | Executes all composed "Teardown" sub-routines safely. This version returns
    -- a Tree data structure wich can be used to gather facts from the resource
    -- cleanup
    runTeardown :: HasTeardown t => t -> IO TeardownResult
    runTeardown t0 =
      let (Teardown teardownAction) = getTeardown t0 in uninterruptibleMask_ teardownAction
    {-# INLINE runTeardown #-}
    
    -- | Executes all composed "Teardown" sub-routines safely
    runTeardown_ :: HasTeardown t => t -> IO ()
    runTeardown_ = void . runTeardown
    

    withException No usage example found for this symbol :( Collapse [-]
    getMonotonicTime No usage example found for this symbol :( Collapse [-]
    hClose No usage example found for this symbol :( Collapse [-]
    hFileSize No usage example found for this symbol :( Collapse [-]
    hFlush No usage example found for this symbol :( Collapse [-]
    hGetBuffering No usage example found for this symbol :( Collapse [-]
    hGetEcho No usage example found for this symbol :( Collapse [-]
    hIsClosed No usage example found for this symbol :( Collapse [-]
    hIsEOF No usage example found for this symbol :( Collapse [-]
    hIsOpen No usage example found for this symbol :( Collapse [-]
    hIsReadable No usage example found for this symbol :( Collapse [-]
    hIsSeekable No usage example found for this symbol :( Collapse [-]
    hIsTerminalDevice No usage example found for this symbol :( Collapse [-]
    hIsWritable No usage example found for this symbol :( Collapse [-]
    hReady No usage example found for this symbol :( Collapse [-]
    hSeek No usage example found for this symbol :( Collapse [-]
    hSetBuffering No usage example found for this symbol :( Collapse [-]
    hSetEcho No usage example found for this symbol :( Collapse [-]
    hSetFileSize No usage example found for this symbol :( Collapse [-]
    hTell No usage example found for this symbol :( Collapse [-]
    hWaitForInput No usage example found for this symbol :( Collapse [-]
    withBinaryFile No usage example found for this symbol :( Collapse [-]
    withFile No usage example found for this symbol :( Collapse [-]
    atomicModifyIORef See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
      BranchResult{} -> resultDidFail result
    
      EmptyResult{}  -> False
    
    -- | Creates a new "Teardown" record from a cleanup "IO" action, the
    -- side-effects from this action are guaranteed to be executed only once, and
    -- also it is guaranteed to be thread-safe in the scenario of multiple threads
    -- executing the same teardown procedure.
    newTeardownIO :: Description -> IO () -> IO Teardown
    newTeardownIO desc disposingAction = do
      teardownResultLock <- newIORef False
      teardownResultRef  <- newIORef Nothing
      return $ Teardown $ do
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    
        if shouldExecute
          then do
    

    atomicModifyIORef' No usage example found for this symbol :( Collapse [-]
    atomicWriteIORef No usage example found for this symbol :( Collapse [-]
    mkWeakIORef No usage example found for this symbol :( Collapse [-]
    modifyIORef No usage example found for this symbol :( Collapse [-]
    modifyIORef' No usage example found for this symbol :( Collapse [-]
    newIORef See 2 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
    didTeardownFail result = case result of
      LeafResult{}   -> isJust (resultError result)
    
      BranchResult{} -> resultDidFail result
    
      EmptyResult{}  -> False
    
    -- | Creates a new "Teardown" record from a cleanup "IO" action, the
    -- side-effects from this action are guaranteed to be executed only once, and
    -- also it is guaranteed to be thread-safe in the scenario of multiple threads
    -- executing the same teardown procedure.
    newTeardownIO :: Description -> IO () -> IO Teardown
    newTeardownIO desc disposingAction = do
      teardownResultLock <- newIORef False
      teardownResultRef  <- newIORef Nothing
      return $ Teardown $ do
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    

    Found in Control.Teardown.Internal.Core from the package teardown
    didTeardownFail :: TeardownResult -> Bool
    didTeardownFail result = case result of
      LeafResult{}   -> isJust (resultError result)
    
      BranchResult{} -> resultDidFail result
    
      EmptyResult{}  -> False
    
    -- | Creates a new "Teardown" record from a cleanup "IO" action, the
    -- side-effects from this action are guaranteed to be executed only once, and
    -- also it is guaranteed to be thread-safe in the scenario of multiple threads
    -- executing the same teardown procedure.
    newTeardownIO :: Description -> IO () -> IO Teardown
    newTeardownIO desc disposingAction = do
      teardownResultLock <- newIORef False
      teardownResultRef  <- newIORef Nothing
      return $ Teardown $ do
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    

    readIORef See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    
        if shouldExecute
          then do
            (elapsed, disposeResult0) <- trackExecutionTime (try disposingAction)
            let disposeResult = LeafResult
                  desc
                  elapsed
                  (either Just (const Nothing) disposeResult0)
    
            writeIORef teardownResultRef (Just disposeResult)
            return disposeResult
          else fromMaybe (emptyTeardownResult desc) <$> readIORef teardownResultRef
    
    -- | Creates a "Teardown" sub-routine that is composed of other smaller
    -- sub-routines. This is ideal for composing the cleanup of an application from
    -- smaller resources allocations that are known beforehand.
    concatTeardown :: Description -> [Teardown] -> Teardown
    

    writeIORef See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
      teardownResultRef  <- newIORef Nothing
      return $ Teardown $ do
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    
        if shouldExecute
          then do
            (elapsed, disposeResult0) <- trackExecutionTime (try disposingAction)
            let disposeResult = LeafResult
                  desc
                  elapsed
                  (either Just (const Nothing) disposeResult0)
    
            writeIORef teardownResultRef (Just disposeResult)
            return disposeResult
          else fromMaybe (emptyTeardownResult desc) <$> readIORef teardownResultRef
    
    -- | Creates a "Teardown" sub-routine that is composed of other smaller
    -- sub-routines. This is ideal for composing the cleanup of an application from
    

    isEmptyMVar No usage example found for this symbol :( Collapse [-]
    mkWeakMVar No usage example found for this symbol :( Collapse [-]
    modifyMVar No usage example found for this symbol :( Collapse [-]
    modifyMVarMasked No usage example found for this symbol :( Collapse [-]
    modifyMVarMasked_ No usage example found for this symbol :( Collapse [-]
    modifyMVar_ No usage example found for this symbol :( Collapse [-]
    newEmptyMVar No usage example found for this symbol :( Collapse [-]
    newMVar No usage example found for this symbol :( Collapse [-]
    putMVar No usage example found for this symbol :( Collapse [-]
    readMVar No usage example found for this symbol :( Collapse [-]
    swapMVar No usage example found for this symbol :( Collapse [-]
    takeMVar No usage example found for this symbol :( Collapse [-]
    tryPutMVar No usage example found for this symbol :( Collapse [-]
    tryReadMVar No usage example found for this symbol :( Collapse [-]
    tryTakeMVar No usage example found for this symbol :( Collapse [-]
    withMVar No usage example found for this symbol :( Collapse [-]
    withMVarMasked No usage example found for this symbol :( Collapse [-]
    memoizeMVar No usage example found for this symbol :( Collapse [-]
    memoizeRef No usage example found for this symbol :( Collapse [-]
    runMemoized No usage example found for this symbol :( Collapse [-]
    atomically No usage example found for this symbol :( Collapse [-]
    checkSTM No usage example found for this symbol :( Collapse [-]
    mkWeakTMVar No usage example found for this symbol :( Collapse [-]
    mkWeakTVar No usage example found for this symbol :( Collapse [-]
    newBroadcastTChanIO No usage example found for this symbol :( Collapse [-]
    newEmptyTMVarIO No usage example found for this symbol :( Collapse [-]
    newTBQueueIO No usage example found for this symbol :( Collapse [-]
    newTChanIO No usage example found for this symbol :( Collapse [-]
    newTMVarIO No usage example found for this symbol :( Collapse [-]
    newTQueueIO No usage example found for this symbol :( Collapse [-]
    newTVarIO No usage example found for this symbol :( Collapse [-]
    readTVarIO No usage example found for this symbol :( Collapse [-]
    registerDelay No usage example found for this symbol :( Collapse [-]
    retrySTM No usage example found for this symbol :( Collapse [-]
    withSystemTempDirectory No usage example found for this symbol :( Collapse [-]
    withSystemTempFile No usage example found for this symbol :( Collapse [-]
    withTempDirectory No usage example found for this symbol :( Collapse [-]
    withTempFile No usage example found for this symbol :( Collapse [-]
    timeout No usage example found for this symbol :( Collapse [-]
    askRunInIO No usage example found for this symbol :( Collapse [-]
    toIO No usage example found for this symbol :( Collapse [-]
    withUnliftIO No usage example found for this symbol :( Collapse [-]
    wrappedWithRunInIO No usage example found for this symbol :( Collapse [-]
    Async No usage example found for this symbol :( Collapse [-]
    Chan No usage example found for this symbol :( Collapse [-]
    TVar No usage example found for this symbol :( Collapse [-]
    SeekMode No usage example found for this symbol :( Collapse [-]
    BufferMode No usage example found for this symbol :( Collapse [-]
    IORef No usage example found for this symbol :( Collapse [-]
    MVar No usage example found for this symbol :( Collapse [-]
    TBQueue No usage example found for this symbol :( Collapse [-]
    TChan No usage example found for this symbol :( Collapse [-]
    TQueue No usage example found for this symbol :( Collapse [-]
    Concurrently No usage example found for this symbol :( Collapse [-]
    AsyncExceptionWrapper No usage example found for this symbol :( Collapse [-]
    Handler No usage example found for this symbol :( Collapse [-]
    StringException No usage example found for this symbol :( Collapse [-]
    SyncExceptionWrapper No usage example found for this symbol :( Collapse [-]
    Memoized No usage example found for this symbol :( Collapse [-]
    MonadUnliftIO No usage example found for this symbol :( Collapse [-]
    UnliftIO No usage example found for this symbol :( Collapse [-]
    ^. No usage example found for this symbol :( Collapse [-]
    lens No usage example found for this symbol :( Collapse [-]
    over No usage example found for this symbol :( Collapse [-]
    set No usage example found for this symbol :( Collapse [-]
    to No usage example found for this symbol :( Collapse [-]
    sets No usage example found for this symbol :( Collapse [-]
    view No usage example found for this symbol :( Collapse [-]
    ASetter No usage example found for this symbol :( Collapse [-]
    ASetter' No usage example found for this symbol :( Collapse [-]
    Getting No usage example found for this symbol :( Collapse [-]
    Lens No usage example found for this symbol :( Collapse [-]
    Lens' No usage example found for this symbol :( Collapse [-]
    SimpleGetter No usage example found for this symbol :( Collapse [-]
    MonadReader No usage example found for this symbol :( Collapse [-]
    optional No usage example found for this symbol :( Collapse [-]
    Arrow No usage example found for this symbol :( Collapse [-]
    & No usage example found for this symbol :( Collapse [-]
    <&> No usage example found for this symbol :( Collapse [-]
    HasCallStack No usage example found for this symbol :( Collapse [-]
    <$!> No usage example found for this symbol :( Collapse [-]
    <=< No usage example found for this symbol :( Collapse [-]
    >=> No usage example found for this symbol :( Collapse [-]
    filterM No usage example found for this symbol :( Collapse [-]
    foldM No usage example found for this symbol :( Collapse [-]
    foldM_ No usage example found for this symbol :( Collapse [-]
    forever No usage example found for this symbol :( Collapse [-]
    replicateM_ No usage example found for this symbol :( Collapse [-]
    unless No usage example found for this symbol :( Collapse [-]
    zipWithM No usage example found for this symbol :( Collapse [-]
    zipWithM_ No usage example found for this symbol :( Collapse [-]
    fix No usage example found for this symbol :( Collapse [-]
    void See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
      {-# INLINE newTeardown #-}
    
    --------------------------------------------------------------------------------
    
    -- | Executes all composed "Teardown" sub-routines safely. This version returns
    -- a Tree data structure wich can be used to gather facts from the resource
    -- cleanup
    runTeardown :: HasTeardown t => t -> IO TeardownResult
    runTeardown t0 =
      let (Teardown teardownAction) = getTeardown t0 in uninterruptibleMask_ teardownAction
    {-# INLINE runTeardown #-}
    
    -- | Executes all composed "Teardown" sub-routines safely
    runTeardown_ :: HasTeardown t => t -> IO ()
    runTeardown_ = void . runTeardown
    {-# INLINE runTeardown_ #-}
    

    forM No usage example found for this symbol :( Collapse [-]
    asks No usage example found for this symbol :( Collapse [-]
    runReader No usage example found for this symbol :( Collapse [-]
    MonadTrans No usage example found for this symbol :( Collapse [-]
    Reader No usage example found for this symbol :( Collapse [-]
    ReaderT No usage example found for this symbol :( Collapse [-]
    >>> No usage example found for this symbol :( Collapse [-]
    bool No usage example found for this symbol :( Collapse [-]
    isRight No usage example found for this symbol :( Collapse [-]
    lefts No usage example found for this symbol :( Collapse [-]
    partitionEithers No usage example found for this symbol :( Collapse [-]
    rights No usage example found for this symbol :( Collapse [-]
    on No usage example found for this symbol :( Collapse [-]
    $> No usage example found for this symbol :( Collapse [-]
    catMaybes No usage example found for this symbol :( Collapse [-]
    fromMaybe See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
        shouldExecute <- atomicModifyIORef
          teardownResultLock
          (\toredown -> if toredown then (True, False) else (True, True))
    
        if shouldExecute
          then do
            (elapsed, disposeResult0) <- trackExecutionTime (try disposingAction)
            let disposeResult = LeafResult
                  desc
                  elapsed
                  (either Just (const Nothing) disposeResult0)
    
            writeIORef teardownResultRef (Just disposeResult)
            return disposeResult
          else fromMaybe (emptyTeardownResult desc) <$> readIORef teardownResultRef
    
    -- | Creates a "Teardown" sub-routine that is composed of other smaller
    -- sub-routines. This is ideal for composing the cleanup of an application from
    -- smaller resources allocations that are known beforehand.
    concatTeardown :: Description -> [Teardown] -> Teardown
    

    isJust See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Core from the package teardown
    trackExecutionTime :: IO a -> IO (NominalDiffTime, a)
    trackExecutionTime routine = do
      start  <- getCurrentTime
      result <- routine
      end    <- getCurrentTime
      return (diffUTCTime end start, result)
    
    -- | Defines a Teardown that does not have any sub-routines associated to it.
    emptyTeardownResult :: Description -> TeardownResult
    emptyTeardownResult = EmptyResult
    
    -- | Returns a boolean indicating if any of the cleanup sub-routine failed
    didTeardownFail :: TeardownResult -> Bool
    didTeardownFail result = case result of
      LeafResult{}   -> isJust (resultError result)
    
      BranchResult{} -> resultDidFail result
    
      EmptyResult{}  -> False
    

    isNothing No usage example found for this symbol :( Collapse [-]
    listToMaybe No usage example found for this symbol :( Collapse [-]
    mapMaybe No usage example found for this symbol :( Collapse [-]
    maybeToList No usage example found for this symbol :( Collapse [-]
    comparing No usage example found for this symbol :( Collapse [-]
    for No usage example found for this symbol :( Collapse [-]
    absurd No usage example found for this symbol :( Collapse [-]
    readMaybe No usage example found for this symbol :( Collapse [-]
    fromShort No usage example found for this symbol :( Collapse [-]
    toShort No usage example found for this symbol :( Collapse [-]
    $!! No usage example found for this symbol :( Collapse [-]
    force No usage example found for this symbol :( Collapse [-]
    yieldThread No usage example found for this symbol :( Collapse [-]
    isCurrentThreadBound No usage example found for this symbol :( Collapse [-]
    myThreadId No usage example found for this symbol :( Collapse [-]
    threadDelay No usage example found for this symbol :( Collapse [-]
    threadWaitRead No usage example found for this symbol :( Collapse [-]
    threadWaitWrite No usage example found for this symbol :( Collapse [-]
    Void No usage example found for this symbol :( Collapse [-]
    ThreadId No usage example found for this symbol :( Collapse [-]
    IntMap No usage example found for this symbol :( Collapse [-]
    IntSet No usage example found for this symbol :( Collapse [-]
    Map No usage example found for this symbol :( Collapse [-]
    Set No usage example found for this symbol :( Collapse [-]
    MonadThrow No usage example found for this symbol :( Collapse [-]
    Hashable No usage example found for this symbol :( Collapse [-]
    PrimMonad No usage example found for this symbol :( Collapse [-]
    HashMap No usage example found for this symbol :( Collapse [-]
    HashSet No usage example found for this symbol :( Collapse [-]
    Vector No usage example found for this symbol :( Collapse [-]
    Unbox No usage example found for this symbol :( Collapse [-]
    hPutBuilder No usage example found for this symbol :( Collapse [-]
    readFileBinary No usage example found for this symbol :( Collapse [-]
    readFileUtf8 No usage example found for this symbol :( Collapse [-]
    withLazyFile No usage example found for this symbol :( Collapse [-]
    writeFileBinary No usage example found for this symbol :( Collapse [-]
    writeFileUtf8 No usage example found for this symbol :( Collapse [-]
    asIO No usage example found for this symbol :( Collapse [-]
    foldMapM No usage example found for this symbol :( Collapse [-]
    forMaybeA No usage example found for this symbol :( Collapse [-]
    forMaybeM No usage example found for this symbol :( Collapse [-]
    fromFirst No usage example found for this symbol :( Collapse [-]
    mapLeft No usage example found for this symbol :( Collapse [-]
    mapMaybeA No usage example found for this symbol :( Collapse [-]
    mapMaybeM No usage example found for this symbol :( Collapse [-]
    nubOrd No usage example found for this symbol :( Collapse [-]
    unlessM No usage example found for this symbol :( Collapse [-]
    whenM No usage example found for this symbol :( Collapse [-]
    fromStrictBytes No usage example found for this symbol :( Collapse [-]
    sappend No usage example found for this symbol :( Collapse [-]
    toStrictBytes No usage example found for this symbol :( Collapse [-]
    GVector No usage example found for this symbol :( Collapse [-]
    LByteString No usage example found for this symbol :( Collapse [-]
    LText No usage example found for this symbol :( Collapse [-]
    SVector No usage example found for this symbol :( Collapse [-]
    UVector No usage example found for this symbol :( Collapse [-]
    displayCallStack No usage example found for this symbol :( Collapse [-]
    logDebug No usage example found for this symbol :( Collapse [-]
    logDebugS No usage example found for this symbol :( Collapse [-]
    logError No usage example found for this symbol :( Collapse [-]
    logErrorS No usage example found for this symbol :( Collapse [-]
    logFuncUseColorL No usage example found for this symbol :( Collapse [-]
    logGeneric No usage example found for this symbol :( Collapse [-]
    logInfo No usage example found for this symbol :( Collapse [-]
    logInfoS No usage example found for this symbol :( Collapse [-]
    logOptionsHandle No usage example found for this symbol :( Collapse [-]
    logOptionsMemory No usage example found for this symbol :( Collapse [-]
    logOther No usage example found for this symbol :( Collapse [-]
    logOtherS No usage example found for this symbol :( Collapse [-]
    logSticky No usage example found for this symbol :( Collapse [-]
    logStickyDone No usage example found for this symbol :( Collapse [-]
    logWarn No usage example found for this symbol :( Collapse [-]
    logWarnS No usage example found for this symbol :( Collapse [-]
    mkLogFunc No usage example found for this symbol :( Collapse [-]
    newLogFunc No usage example found for this symbol :( Collapse [-]
    noLogging No usage example found for this symbol :( Collapse [-]
    setLogMinLevel No usage example found for this symbol :( Collapse [-]
    setLogMinLevelIO No usage example found for this symbol :( Collapse [-]
    setLogTerminal No usage example found for this symbol :( Collapse [-]
    setLogUseColor No usage example found for this symbol :( Collapse [-]
    setLogUseLoc No usage example found for this symbol :( Collapse [-]
    setLogUseTime No usage example found for this symbol :( Collapse [-]
    setLogVerboseFormat No usage example found for this symbol :( Collapse [-]
    setLogVerboseFormatIO No usage example found for this symbol :( Collapse [-]
    withLogFunc No usage example found for this symbol :( Collapse [-]
    HasLogFunc No usage example found for this symbol :( Collapse [-]
    LogFunc No usage example found for this symbol :( Collapse [-]
    LogLevel No usage example found for this symbol :( Collapse [-]
    LogOptions No usage example found for this symbol :( Collapse [-]
    LogSource No usage example found for this symbol :( Collapse [-]
    decodeUtf8Lenient No usage example found for this symbol :( Collapse [-]
    tshow See 1 Occurences [+] Collapse [-]
    Found in Control.Teardown.Internal.Printer from the package teardown
    import Control.Teardown.Internal.Types
    
    treeTrunk :: Int -> Int -> Doc ann
    treeTrunk start level = hcat (map (\_ -> "    ") [1 .. start])
      <> hcat (map (\_ -> "   |") [start .. level - 1])
    
    -- | Renders an ASCII Tree with the "TeardownResult" of a "Teardown" sub-routine
    -- execution
    prettyTeardownResult :: TeardownResult -> Doc ann
    prettyTeardownResult result = render 0 0 result <> hardline
     where
      renderError start level (SomeException err) =
        let
          (fstErrLine, errLines) = case Text.lines (tshow err) of
            [] ->
              error "Expecting reported error to have a line of content, got none"
    
            (fstErrLine' : errLines') -> (fstErrLine', errLines')
    

    modifyURef No usage example found for this symbol :( Collapse [-]
    newURef No usage example found for this symbol :( Collapse [-]
    readURef No usage example found for this symbol :( Collapse [-]
    writeURef No usage example found for this symbol :( Collapse [-]
    IOURef No usage example found for this symbol :( Collapse [-]
    URef No usage example found for this symbol :( Collapse [-]
    liftRIO No usage example found for this symbol :( Collapse [-]
    modifySomeRef No usage example found for this symbol :( Collapse [-]
    newSomeRef No usage example found for this symbol :( Collapse [-]
    newUnboxedSomeRef No usage example found for this symbol :( Collapse [-]
    readSomeRef No usage example found for this symbol :( Collapse [-]
    runRIO No usage example found for this symbol :( Collapse [-]
    writeSomeRef No usage example found for this symbol :( Collapse [-]
    HasStateRef No usage example found for this symbol :( Collapse [-]
    HasWriteRef No usage example found for this symbol :( Collapse [-]
    RIO No usage example found for this symbol :( Collapse [-]
    SomeRef No usage example found for this symbol :( Collapse [-]
    runSimpleApp No usage example found for this symbol :( Collapse [-]
    SimpleApp No usage example found for this symbol :( Collapse [-]
    trace No usage example found for this symbol :( Collapse [-]
    traceDisplay No usage example found for this symbol :( Collapse [-]
    traceDisplayEvent No usage example found for this symbol :( Collapse [-]
    traceDisplayEventIO No usage example found for this symbol :( Collapse [-]
    traceDisplayIO No usage example found for this symbol :( Collapse [-]
    traceDisplayId No usage example found for this symbol :( Collapse [-]
    traceDisplayM No usage example found for this symbol :( Collapse [-]
    traceDisplayMarker No usage example found for this symbol :( Collapse [-]
    traceDisplayMarkerIO No usage example found for this symbol :( Collapse [-]
    traceDisplayStack No usage example found for this symbol :( Collapse [-]
    traceEvent No usage example found for this symbol :( Collapse [-]
    traceEventIO No usage example found for this symbol :( Collapse [-]
    traceIO No usage example found for this symbol :( Collapse [-]
    traceId No usage example found for this symbol :( Collapse [-]
    traceM No usage example found for this symbol :( Collapse [-]
    traceMarker No usage example found for this symbol :( Collapse [-]
    traceMarkerIO No usage example found for this symbol :( Collapse [-]
    traceShow No usage example found for this symbol :( Collapse [-]
    traceShowEvent No usage example found for this symbol :( Collapse [-]
    traceShowEventIO No usage example found for this symbol :( Collapse [-]
    traceShowIO No usage example found for this symbol :( Collapse [-]
    traceShowId No usage example found for this symbol :( Collapse [-]
    traceShowM No usage example found for this symbol :( Collapse [-]
    traceShowMarker No usage example found for this symbol :( Collapse [-]
    traceShowMarkerIO No usage example found for this symbol :( Collapse [-]
    traceShowStack No usage example found for this symbol :( Collapse [-]
    traceStack No usage example found for this symbol :( Collapse [-]