chatty-0.3.1.4: Some monad transformers and typeclasses to simplify I/O on a transformer stack.

Safe HaskellSafe-Inferred

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

localEnvironment :: Functor m => ExpanderT m a -> m aSource

Run this function inside a blank environment.

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

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, ExpanderEnv m) => String -> m StringSource

Expand $variables. TODO: ${var}

isAnum :: Char -> BoolSource

Is alphanumeric?

class Monad ee => ExpanderEnv ee whereSource

Typeclass for all environment storages.

Methods

mgetv :: String -> ee EnvVarSource

Get environment variable

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

Put environment variable