Copyright | (c) Justus Adam, 2015 |
---|---|
License | LGPL-3 |
Maintainer | development@justusadam.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- substitute :: ToMustache j => MustacheTemplate -> j -> Either String Text
- substituteValue :: MustacheTemplate -> Value -> Either String Text
- data Context a = Context [a] a
- search :: Context Value -> [Text] -> Maybe Value
- innerSearch :: [Text] -> Value -> Maybe Value
- toString :: Value -> Text
Substitution
substitute :: ToMustache j => MustacheTemplate -> j -> Either String Text Source
Substitutes all mustache defined tokens (or tags) for values found in the provided data structure.
Equivalent to substituteValue . toMustache
.
substituteValue :: MustacheTemplate -> Value -> Either String Text Source
Substitutes all mustache defined tokens (or tags) for values found in the provided data structure.
Working with Context
Representation of stateful context for the substitution process
Context [a] a |
ToMustache (Context Value -> MustacheAST -> Either String Text) Source | |
ToMustache (Context Value -> MustacheAST -> Either String MustacheAST) Source | |
ToMustache (Context Value -> MustacheAST -> String) Source | |
ToMustache (Context Value -> MustacheAST -> Text) Source | |
ToMustache (Context Value -> MustacheAST -> MustacheAST) Source |