Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ginger parser.
- parseGinger :: Monad m => IncludeResolver m -> Maybe SourceName -> Source -> m (Either ParserError Template)
- parseGingerFile :: Monad m => IncludeResolver m -> SourceName -> m (Either ParserError Template)
- data ParserError = ParserError {}
- type IncludeResolver m = SourceName -> m (Maybe Source)
- type Source = String
- type SourceName = String
Documentation
parseGinger :: Monad m => IncludeResolver m -> Maybe SourceName -> Source -> m (Either ParserError Template) Source #
Parse Ginger source from memory.
parseGingerFile :: Monad m => IncludeResolver m -> SourceName -> m (Either ParserError Template) Source #
Parse Ginger source from a file.
data ParserError Source #
Error information for Ginger parser errors.
ParserError | |
|
type IncludeResolver m = SourceName -> m (Maybe Source) Source #
Used to resolve includes. Ginger will call this function whenever it
encounters an {% include %}, {% import %}, or {% extends %} directive.
If the required source code is not available, the resolver should return
Nothing
, else Just
the source.
type SourceName = String Source #
A source identifier (typically a filename).