-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Easy Runtime Templates
--
-- EJS-like template engine for Haskell.
@package ert
@version 0.0.2.0
-- | This module implements compiler and renderer for easy runtime
-- templates. It can be used for advanced code preprocessing or simple
-- substitution of some variables in string.
--
-- Since template engine uses Aeson's Value type, you must
-- use types, which have ToJSON instances, for rendering it. Also
-- you can use Object with variables as fields.
module Data.EasyTpl
-- | Compiled template.
data Template
-- | Template token.
data TemplateToken
-- | A JSON value represented as a Haskell value.
data Value :: *
Object :: !Object -> Value
Array :: !Array -> Value
String :: !Text -> Value
Number :: !Scientific -> Value
Bool :: !Bool -> Value
Null :: Value
-- | A space-efficient representation of a Word8 vector, supporting
-- many efficient operations.
--
-- A ByteString contains 8-bit bytes, or by using the operations
-- from Data.ByteString.Char8 it can be interpreted as containing
-- 8-bit characters.
data ByteString :: *
-- | A map from keys to values. A map cannot contain duplicate keys; each
-- key can map to at most one value.
data HashMap k v :: * -> * -> *
-- | Boxed vectors, supporting efficient slicing.
data Vector a :: * -> *
-- | Compile template from ByteString.
compile :: ByteString -> Either String Template
-- | Render template to ByteString.
render :: ToJSON e => Template -> e -> ByteString
-- | Compile template from string.
compile' :: String -> Either String Template
-- | Render template to string.
render' :: ToJSON e => Template -> e -> String
-- | Template parser function. Use this for parsing templates.
parseTemplate :: Parser Template
-- | Less template parser. Used internally for parsing subtemplates.
parseTemplate' :: Parser Template
-- | Expression parser. Use this for parsing expressions.
parseExpression :: Parser Expression
-- | Default data for render. Empty data for using with standalone render.
defaultData :: Value