slab-0.0.3.0: A programmable markup language to generate HTML
Safe HaskellSafe-Inferred
LanguageHaskell2010

Slab.Run

Description

Slab.Run accepts commands defined in the Slab.Command module and runs them.

Synopsis

Documentation

run :: Command -> IO () Source #

parse :: Text -> IO () Source #

eval :: Text -> IO () Source #

"eval" parses a string as a Syntax.Syntax, and evaluates it. This doesn't run the proprocessing stage.

    Run.eval "p= 1 + 2 * 3"

render :: Text -> IO () Source #

Run "eval" and render the result.

calc :: Text -> IO () Source #

"calc" parses a string as a Syntax.Expr, and evaluates it. I.e. it doens't use the fragment syntax, or imports and includes.

    Run.calc "1 + 2 * 3"