chatty-0.8.0.0: Some monad transformers and typeclasses for text in- and output abstraction.
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

Instances

Instances details
ChFinalizer m => ChFinalizer (AtomStoreT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (CounterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

mqfh :: Handle -> CounterT m () Source #

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

mfin :: CounterT m () Source #

ChFinalizer m => ChFinalizer (NullExpanderT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (HistoryT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

mqfh :: Handle -> HistoryT m () Source #

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

mfin :: HistoryT m () Source #

ChFinalizer m => ChFinalizer (ExpanderT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

mqfh :: Handle -> ExpanderT m () Source #

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

mfin :: ExpanderT m () Source #

MonadIO m => ChFinalizer (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Finalizer

ChFinalizer m => ChFinalizer (RecorderT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

mqfh :: Handle -> RecorderT m () Source #

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

mfin :: RecorderT m () Source #

ChFinalizer m => ChFinalizer (OutRedirT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

mqfh :: Handle -> OutRedirT m () Source #

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

mfin :: OutRedirT m () Source #

ChFinalizer m => ChFinalizer (DeafT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

mqfh :: Handle -> DeafT m () Source #

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

mfin :: DeafT m () Source #

ChFinalizer m => ChFinalizer (HtmlPrinterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (AnsiPrinterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (JoinerT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

mqfh :: Handle -> JoinerT m () Source #

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

mfin :: JoinerT m () Source #

ChFinalizer m => ChFinalizer (HandleFilterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (BoolFilterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (IntFilterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (HandleArchiverT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (BoolArchiverT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (IntArchiverT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (InRedirT m) Source # 
Instance details

Defined in Text.Chatty.Scanner

Methods

mqfh :: Handle -> InRedirT m () Source #

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

mfin :: InRedirT m () Source #

ChFinalizer m => ChFinalizer (HereStringT m) Source # 
Instance details

Defined in Text.Chatty.Scanner

ChFinalizer m => ChFinalizer (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

newtype HandleCloserT m a Source #

Handle-closing transformer

Constructors

HandleCloser 

Fields

Instances

Instances details
MonadTrans HandleCloserT Source # 
Instance details

Defined in Text.Chatty.Finalizer

Methods

lift :: Monad m => m a -> HandleCloserT m a #

ChChannelPrinter Bool m => ChChannelPrinter Bool (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChChannelPrinter Int m => ChChannelPrinter Int (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChChannelPrinter Handle m => ChChannelPrinter Handle (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Monad m => Monad (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Finalizer

Methods

(>>=) :: HandleCloserT m a -> (a -> HandleCloserT m b) -> HandleCloserT m b #

(>>) :: HandleCloserT m a -> HandleCloserT m b -> HandleCloserT m b #

return :: a -> HandleCloserT m a #

Monad m => Functor (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Finalizer

Methods

fmap :: (a -> b) -> HandleCloserT m a -> HandleCloserT m b #

(<$) :: a -> HandleCloserT m b -> HandleCloserT m a #

Monad m => Applicative (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Finalizer

Methods

pure :: a -> HandleCloserT m a #

(<*>) :: HandleCloserT m (a -> b) -> HandleCloserT m a -> HandleCloserT m b #

liftA2 :: (a -> b -> c) -> HandleCloserT m a -> HandleCloserT m b -> HandleCloserT m c #

(*>) :: HandleCloserT m a -> HandleCloserT m b -> HandleCloserT m b #

(<*) :: HandleCloserT m a -> HandleCloserT m b -> HandleCloserT m a #

MonadIO m => MonadIO (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Finalizer

Methods

liftIO :: IO a -> HandleCloserT m a #

ChAtoms m => ChAtoms (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

newAtom :: HandleCloserT m (Atom v) #

funAtom :: Atom b -> (b -> a) -> (b -> a -> b) -> HandleCloserT m (Atom a) #

funAtom2 :: Atom b -> Atom c -> ((b, c) -> a) -> ((b, c) -> a -> (b, c)) -> HandleCloserT m (Atom a) #

putAtom :: Atom v -> v -> HandleCloserT m () #

getAtom :: Atom v -> HandleCloserT m v #

dispAtom :: Atom v -> HandleCloserT m () #

cloneAtom :: Atom v -> HandleCloserT m (Atom v) #

ChCounter m => ChCounter (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChExpand m => ChExpand (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChHistoryEnv m => ChHistoryEnv (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChExpanderEnv m => ChExpanderEnv (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

MonadIO m => ChFinalizer (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Finalizer

ChPrinter m => ChPrinter (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChScanner m => ChScanner (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

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

Run function with handle closer