Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Expr
- = Noop
- | RawText Text
- | Num Scientific
- | Variable JsonVarPath
- | QuoteString Text
- | Equal Expr Expr
- | NotEqual Expr Expr
- | GtEqual Expr Expr
- | LtEqual Expr Expr
- | Gt Expr Expr
- | Lt Expr Expr
- | Or Expr Expr
- | And Expr Expr
- | Contains Expr Expr
- | Nil
- | Null
- | Trueth
- | Falseth
- | Truthy Expr
- | IfClause Expr
- | IfKeyClause Expr
- | ElsIfClause Expr
- | Else
- | FilterCell Text [Expr]
- | Filter Expr [Expr]
- | Output Expr
- | TrueStatements [Expr]
- | IfLogic Expr Expr
- | CaseLogic Expr [(Expr, Expr)]
- type JsonVarPath = NonEmpty VarIndex
- data LiquidError
- type Rendering a = AccValidation [LiquidError] a
- data VarIndex
- interpret :: Value -> [Expr] -> Rendering Text
- interpretWithJson :: Value -> Text -> Rendering Text
- parseTemplate :: Text -> IResult Text [Expr]
- renderTemplate :: Value -> Expr -> Rendering Text
- templateP :: Prism' Text [Expr]
- templateParser :: Parser [Expr]
Documentation
type JsonVarPath = NonEmpty VarIndex Source
data LiquidError Source
type Rendering a = AccValidation [LiquidError] a Source
Interpret function - for use in testing the lib
parseTemplate :: Text -> IResult Text [Expr] Source
Run the templateParser on input text, force partial results to terminate with Failure
renderTemplate :: Value -> Expr -> Rendering Text Source
Rendering types
Main template block rendering fn
templateParser :: Parser [Expr] Source
Parse an entire template into chunks