HStringTemplate is a general purpose templating system, geared especially towards HTML and based on Terrence Parr’s Java library.
Development version at: darcs get http://code.haskell.org/HStringTemplate/
Additional documentation on the grammar at: http://www.antlr.org/wiki/display/ST/StringTemplate+3.1+Documentation as well as in some posts at https://fmapfixreturn.wordpress.com
Lots of cleanup, lots of additions, hopefully this is an extremely usable release. Still no group or interface files, but I suspect that those are mainly useful for code-generation, which seems like something Haskell programmers would want to use something other than a templating system for in any case.
On to the good stuff:
- Now on hackage!
- Generics. Not one but two types. One set of simple bindings for the standard Data class, and one for syb-with-class. (Alex Drummond’s RJson library, which is really cool, was very helpful in figuring out how to do this).
- A withContext method that turns any set of name-value bindings into the context for a StringTemplate. Along with the syb-with-class bindings, this should make for relatively seamless interoperability with HAppS.
- Lots of other additional bindings for working with standard time formats, numeric types, etc.
- Improved pretty printing support, eliminating corner-cases where wrapping did not occur.
- Creation of directory groups is now done properly in the IO monad, with caching functionality moved to the scarily-named unsafeVolatileDirectoryGroup.
- 80% Top-Level testing coverage in the base. (And more to come, but I only have so much time).
And of course, patches and feedback always welcome.