chatty-0.6.4.0: Some monad transformers and typeclasses for abstraction of global dependencies.

Safe HaskellSafe
LanguageHaskell2010

Text.Chatty.Finalizer

Description

Provides handle-closing.

Synopsis

Documentation

class Monad m => ChFinalizer m where Source

Class for all handle-finalizing monads. Required for file redirections.

Minimal complete definition

mqfh, mfin

Methods

mqfh :: Handle -> m () Source

Enqueue handle

mqfhs :: [Handle] -> m () Source

Enqueue list of handles

mfin :: m () Source

Finalize all queued handles

withLazyIO :: (MonadIO m, Functor m) => HandleCloserT m a -> m a Source

Run function with handle closer