The mustache2hs package

[Tags:program]

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]

Properties

Versions 0.1, 0.1.1, 0.2, 0.2.1, 0.2.1.1, 0.2.2, 0.3
Dependencies base (==4.*), blaze-builder, bytestring, filepath, haskell-src, parsec (>=3.1.2), text, transformers, utf8-string [details]
License OtherLicense
Copyright © 2012 Stephen Paul Weber
Author Stephen Paul Weber <singpolyma@singpolyma.net>
Maintainer Stephen Paul Weber <singpolyma@singpolyma.net>
Stability experimental
Category Utility
Home page http://github.com/singpolyma/mustache2hs
Bug tracker http://github.com/singpolyma/mustache2hs/issues
Source repository head: git clone git://github.com/singpolyma/mustache2hs.git
Uploaded Wed Jan 9 23:24:53 UTC 2013 by StephenWeber
Distributions NixOS:0.3
Downloads 1320 total (17 in the last 30 days)
Votes
0 []
Status Docs not available [build log]
All reported builds failed as of 2015-11-23 [all 5 reports]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for mustache2hs

Readme for mustache2hs-0.2

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.