Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Text.Chatty.Finalizer
Description
Provides handle-closing.
- class Monad m => ChFinalizer m where
- newtype HandleCloserT m a = HandleCloser {
- runHandleCloserT :: [Handle] -> m (a, [Handle])
- withLazyIO :: (MonadIO m, Functor m) => HandleCloserT m a -> m a
Documentation
class Monad m => ChFinalizer m where Source
Class for all handle-finalizing monads. Required for file redirections.
Methods
Enqueue handle
mqfhs :: [Handle] -> m () Source
Enqueue list of handles
Finalize all queued handles
Instances
newtype HandleCloserT m a Source
Handle-closing transformer
Constructors
HandleCloser | |
Fields
|
Instances
withLazyIO :: (MonadIO m, Functor m) => HandleCloserT m a -> m a Source
Run function with handle closer