-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Text template library targeted at the web / HTML generation -- -- Press is a general purpose text templating engine that is targeted at -- generating HTML Web content. It uses the same syntax -- DjangoJinja templates use. @package press @version 0.1.2 module Text.Press.Types data RenderState RenderState :: Parser -> Template -> [JSValue] -> RenderState renderStateParser :: RenderState -> Parser renderStateTemplate :: RenderState -> Template renderStateValues :: RenderState -> [JSValue] data PressError PressError :: String -> PressError ParseError :: ParseError -> PressError RenderError :: String -> PressError type RenderT a = WriterT [String] (StateT RenderState (ErrorT PressError IO)) a type RenderT_ = RenderT () getRenderState :: RenderT RenderState setRenderState :: RenderState -> RenderT () data TagFunc TagFunc :: RenderT_ -> TagFunc data Node Var :: String -> Node Tag :: TagName -> TagFunc -> Node Text :: String -> Node type TemplatePath = String data Template Template :: Maybe TemplatePath -> Map String [Node] -> [Node] -> String -> Template tmplExtends :: Template -> Maybe TemplatePath tmplBlocks :: Template -> Map String [Node] tmplNodes :: Template -> [Node] tmplFilename :: Template -> String type TagName = String type TemplateParser a = Parsec [(Token, SourcePos)] ParserState a type NodeParser = TemplateParser (Maybe Node) data TagType TagType :: (TagName -> String -> NodeParser) -> TagType data Expr ExprStr :: String -> Expr ExprVar :: String -> Expr ExprNum :: Double -> Expr type ParserState = (Parser, Template) data Token PText :: String -> Token PTag :: TagName -> String -> Token PVar :: String -> Token data Parser Parser :: Map TagName TagType -> [String] -> Map TemplatePath Template -> Parser parserTagTypes :: Parser -> Map TagName TagType parserSearchPaths :: Parser -> [String] parserTemplateCache :: Parser -> Map TemplatePath Template class Render a render :: (Render a) => a -> RenderT_ instance Show Parser instance Ord Token instance Show Token instance Eq Token instance Ord Expr instance Eq Expr instance Show Expr instance Show Template instance Show Node instance Show PressError instance Show TagType instance Show TagFunc instance Error PressError module Text.Press.Render split :: String -> String -> [String] showBlock :: String -> RenderT_ lookupFirst :: (Ord k) => k -> [Map k a] -> Maybe a coerceJSToBool :: JSValue -> Bool instance Render JSValue instance Render TagFunc instance Render Node module Text.Press.Parser parseFile :: Parser -> String -> IO (Either ParseError Template) parseString :: Parser -> String -> Either ParseError Template tokensToTemplate :: Parsec [(Token, SourcePos)] ParserState Template failWithParseError :: (Stream s m t) => ParseError -> ParsecT s u m a module Text.Press.Tags exprToBool :: Expr -> RenderT Bool showIfElse :: [(Expr, [Node])] -> [Node] -> RenderT_ showFor :: String -> Expr -> [Node] -> [Node] -> RenderT_ module Text.Press.Run type Result = Either PressError [String] runJSValuesWithPathStTErrT :: [JSValue] -> String -> StateT Parser (ErrorT PressError IO) [String] runJSValuesWithBody :: [JSValue] -> String -> IO Result runJSValuesWithTemplate :: [JSValue] -> Template -> Parser -> IO Result runJSValuesWithTemplateStTErrT :: [JSValue] -> Template -> StateT Parser (ErrorT PressError IO) [String]