chatty-0.8.0.0: Some monad transformers and typeclasses for text in- and output abstraction.
Safe HaskellSafe
LanguageHaskell2010

Text.Chatty.Expansion.Vars

Synopsis

Documentation

data EnvVar Source #

Some environment variable

Constructors

NotSet

Not set.

Literal String

An embeddable string.

forall a.Show a => Scalar a

Something we can show.

Array [EnvVar]

Array of that

Instances

Instances details
Show EnvVar Source # 
Instance details

Defined in Text.Chatty.Expansion.Vars

newtype ExpanderT m a Source #

Environment storage and variable expander.

Constructors

Expander 

Fields

Instances

Instances details
MonadTrans ExpanderT Source # 
Instance details

Defined in Text.Chatty.Expansion.Vars

Methods

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

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Expansion.Vars

Methods

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

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

return :: a -> ExpanderT m a #

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

Defined in Text.Chatty.Expansion.Vars

Methods

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

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

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

Defined in Text.Chatty.Expansion.Vars

Methods

pure :: a -> ExpanderT m a #

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

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

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

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

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

Defined in Text.Chatty.Expansion.Vars

Methods

liftIO :: IO a -> ExpanderT m a #

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

Defined in Text.Chatty.Interactor

Methods

newAtom :: ExpanderT m (Atom v) #

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

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

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

getAtom :: Atom v -> ExpanderT m v #

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

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

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

Defined in Text.Chatty.Interactor

Methods

countOn :: ExpanderT m Int #

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

Defined in Text.Chatty.Expansion.Vars

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

Defined in Text.Chatty.Interactor

Monad m => ChExpanderEnv (ExpanderT m) Source # 
Instance details

Defined in Text.Chatty.Expansion.Vars

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 #

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

localEnvironment :: Functor m => ExpanderT m a -> m a Source #

Run this function inside a blank environment.

forkEnvironment :: (Functor m, Monad m, MonadIO m) => ExpanderT m a -> m a Source #

Run this function in a locally modifiable, but not exported environment

exportAll :: (Monad m, MonadIO m) => ExpanderT m () Source #

Export this local environment.

expandVars :: (Monad m, Functor m, ChExpanderEnv m) => String -> m String Source #

Expand $variables

isAnum :: Char -> Bool Source #

Is alphanumeric?

class Monad ee => ChExpanderEnv ee where Source #

Typeclass for all environment storages.

Methods

mgetv :: String -> ee EnvVar Source #

Get environment variable

mputv :: String -> EnvVar -> ee () Source #

Put environment variable

Instances

Instances details
ChExpanderEnv IO Source # 
Instance details

Defined in Text.Chatty.Expansion.Vars

Methods

mgetv :: String -> IO EnvVar Source #

mputv :: String -> EnvVar -> IO () Source #

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

Monad m => ChExpanderEnv (ExpanderT m) Source # 
Instance details

Defined in Text.Chatty.Expansion.Vars

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

Methods

mgetv :: String -> DeafT m EnvVar Source #

mputv :: String -> EnvVar -> DeafT m () Source #

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

Orphan instances

ChExpand IO Source # 
Instance details

Methods

expand :: String -> IO String Source #