mustache2hs: Utility to generate Haskell code from Mustache templates

[ program, utility ] [ Propose Tags ]

This utility take 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 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]
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, 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 Thu Aug 23 05:31:30 UTC 2012
Distributions NixOS:0.3
Executables mustache2hs
Downloads 2341 total (19 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-24 [all 7 reports]
Hackage Matrix CI

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for mustache2hs-0.1

[back to package description]
This utility take 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 '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.