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

Safe HaskellSafe-Inferred

Text.Chatty.Finalizer

Description

Provides handle-closing.

Synopsis

Documentation

class Monad m => ChFinalizer m whereSource

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

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 aSource

Run function with handle closer