mustache2hs: Utility to generate Haskell code from Mustache templates

[ program, utility ] [ Propose Tags ]

This utility takes in Haskell records (single data constructor only) and a list of mustache template and record name pairs, and generates Haskell code for functions that take an escape function and one of the records, and returns a Data.Text.Lazy.Builder.Builder.

This allows most records to be used as context for rendering a template, and gives GHC the ability to typecheck the template's use of record fields at compile time. It also means your application does not need to be reading template files off disk in production.

Usage example:

mustache2hs -m Records.hs main.mustache SomeRec sub.mustache OtherRec

A full example is in the git repository.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.1.1, 0.2, 0.2.1, 0.2.1.1, 0.2.2, 0.3
Dependencies base (>=4.2.0.0 && <5.0.0.0), blaze-builder (>=0.2.0.0), bytestring, filepath, haskell-src, parsec (>=3.1.2), text, transformers, utf8-string [details]
License LicenseRef-OtherLicense
Copyright © 2012 Stephen Paul Weber
Author Stephen Paul Weber <singpolyma@singpolyma.net>
Maintainer Stephen Paul Weber <singpolyma@singpolyma.net>
Category Utility
Home page http://github.com/singpolyma/mustache2hs
Bug tracker http://github.com/singpolyma/mustache2hs/issues
Source repo head: git clone git://github.com/singpolyma/mustache2hs.git
Uploaded by StephenWeber at 2013-09-23T16:48:20Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables mustache2hs
Downloads 4808 total (17 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]

Readme for mustache2hs-0.3

[back to package description]
This utility takes in Haskell records (single data constructor only)
and a list of mustache template and record name pairs, and generates
Haskell code for functions that take an escape function and one of
the records, and returns a 'Data.Text.Lazy.Builder.Builder'.

This allows most records to be used as context for rendering a
template, and gives GHC the ability to typecheck the template's use of
record fields at compile time.  It also means your application does
not need to be reading template files off disk in production.

Usage example:

> mustache2hs -m Records.hs main.mustache SomeRec sub.mustache OtherRec

A full example is in the git repository.