The mustache2hs package

[ Tags: 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]

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>
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 Sat Jan 12 19:43:47 UTC 2013 by StephenWeber
Distributions NixOS:0.3
Executables mustache2hs
Downloads 1617 total (122 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2015-06-05 [all 7 reports]
Hackage Matrix CI

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for mustache2hs-0.2.1

[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.