ginger-0.9.1.0: An implementation of the Jinja2 template language in Haskell

Safe HaskellNone
LanguageHaskell2010

Text.Ginger.Run.VM

Synopsis

Documentation

withLocalState :: (Monad m, MonadState s m) => m a -> m a Source #

Helper function to run a State action with a temporary state, reverting to the old state after the action has finished.

withLocalScope :: Monad m => Run p m h a -> Run p m h a Source #

Helper function to run a Scope action with a temporary scope, reverting to the old scope after the action has finished.

withEncoder :: (ContextEncodable h, Monad m) => (GVal (Run p m h) -> h) -> Run p m h a -> Run p m h a Source #

Override the encoder used for converting GVals to the output type. This can be used for things like temporarily disabling HTML encoding.

setVar :: Monad m => VarName -> GVal (Run p m h) -> Run p m h () Source #

getVar :: Monad m => VarName -> Run p m h (GVal (Run p m h)) Source #

clearCapture :: (Monoid h, Monad m) => Run p m h () Source #

appendCapture :: (Monoid h, Monad m) => h -> Run p m h () Source #

fetchCapture :: Monad m => Run p m h h Source #