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.


Properties

Versions0.1, 0.1.1, 0.2, 0.2.1, 0.2.1.1, 0.2.2, 0.3
Dependenciesbase (==4.*), blaze-builder, bytestring, filepath, haskell-src, parsec (>=3.1.2), text, transformers, utf8-string
LicenseOtherLicense
Copyright© 2012 Stephen Paul Weber
AuthorStephen Paul Weber <singpolyma@singpolyma.net>
MaintainerStephen Paul Weber <singpolyma@singpolyma.net>
Stabilityexperimental
CategoryUtility
Home pagehttp://github.com/singpolyma/mustache2hs
Bug trackerhttp://github.com/singpolyma/mustache2hs/issues
Source repositoryhead: git clone git://github.com/singpolyma/mustache2hs.git
Executablesmustache2hs
Upload dateSat Jan 12 19:43:47 UTC 2013
Uploaded byStephenWeber
Downloads513 total (46 in last 30 days)

Downloads

Maintainers' corner

For package maintainers and hackage trustees