microstache-1: Mustache templates for Haskell

Copyright | © 2016–2017 Stack Builders
License | BSD 3 clause
Maintainer | Mark Karpov <markkarpov@openmailbox.org>
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.Microstache.Render

Description

Functions for rendering Mustache templates. You don't usually need to import the module, because Text.Microstache re-exports everything you may need, import that module instead.

Synopsis

- renderMustache :: Template -> Value -> Text

# Documentation

renderMustache :: Template -> Value -> Text #

Render a Mustache `Template` using Aeson's `Value` to get actual values for interpolation.

As of version 0.2.0, if referenced values are missing (which almost always indicates some sort of mistake), `MustacheRenderException` will be thrown. The included `Key` will indicate full path to missing value and `PName` will contain the name of active partial.