HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulemicrostache-1.0.3.1Haskell2010

Text.Microstache.Type

Types used by the package. You don't usually need to import the module, because Text.Microstache re-exports everything you may need, import that module instead.

Synopsis
datadata Template

Mustache template as name of “top-level” template and a collection of all available templates (partials).

Template is a Semigroup. This means that you can combine Templates (and their caches) using the (<>) operator, the resulting Template will have the same currently selected template as the left one. Union of caches is also left-biased.

Constructors

Instances7Eq, Data, Ord, Show, Generic, Semigroup, …
datadata Node

Structural element of template.

Constructors

Instances6Eq, Data, Ord, Show, Generic, Rep
newtypenewtype Key

Identifier for values to interpolate.

The representation is the following:

  • [] — empty list means implicit iterators;

  • [text] — single key is a normal identifier;

  • [text1, text2] — multiple keys represent dotted names.

Constructors

Instances9Eq, Data, Ord, Show, Generic, Semigroup, …
valueshowKey :: Key -> Text

Pretty-print a key, this is helpful, for example, if you want to display an error message.

newtypenewtype PName

Identifier for partials. Note that with the OverloadedStrings extension you can use just string literals to create values of this type.

Constructors

Instances8Eq, Data, Ord, Show, IsString, Generic, …

Exception that is thrown when parsing of a template has failed or referenced values were not provided.

Constructors

Instances5Eq, Show, Generic, Exception, Rep

Constructors

Instances5Eq, Show, Generic, Exception, Rep