Haskell implementation of mustache templates.
Implements the official specs version 1.1.3
The old Haskell implementation of mustache templates hastache seemed pretty abandoned to me. This implementation aims to be much easier to use and (fingers crossed) better maintained.
Since it is so easy to use and requires but a few files of code, I’ve also written a small executable that compiles and renders mustache templates with data input from json or yaml files.
Please refer to the documentation on hackage.
$ haskell-mustache --help Simple mustache template substitution arguments [OPTIONS] TEMPLATE [DATA-FILES] Common flags: -t --templatedirs[=DIRECTORY] The directory in which to search for the templates -? --help Display help message -V --version Print version information
Current implementation substitutes the
TEMPLATE once with each
- [x] String parser for mustache templates
- [x] Template substitution
- [x] Standalone executable
- [x] Support for ‘set delimiter’
- [x] More efficiency using
- [x] More efficient Text parsing
- [x] Test coverage provided via the official specs
- [x] Haddock documentation
- [ ] More instances for
Mustache library changelog
- Removed dependency tagsoup
- Added ToMustache instances for some numbers
- Removed any dependency on ghc 7.10-type OverlappingInstances
- Resolved String/List overlapping instances
- Added a necessary OVERLAPPABLE pragma
v0.4.0.0rc-4 (current stable version)
- Subsequently removed any dependency on overlapping instances
- Readded support for ghc version 7.8
Char -> Valueinstance of
ToMustache(because of overlap)
- Added infix precedence to conversion operators
INLINEABLEpragma to conversion functions
Dropped GHC 7.8 support in favor of efficient and easy data conversion.
- improved documentation
- fixed a bug with scope
- small interface changes