The HStringTemplate package

[Tags: bsd3, library]

A port of the Java library by Terrence Parr.

[Skip to ReadMe]


Versions0.2, 0.3, 0.3.1, 0.3.2, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.5, 0.5.1,,,, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.8, 0.6.9, 0.6.10, 0.6.11, 0.6.12, 0.7.0, 0.7.1, 0.7.3, 0.8, 0.8.1, 0.8.2, 0.8.3
Change logNone available
Dependenciesarray, base, bytestring, containers, directory, filepath, old-locale, old-time, parsec, pretty, syb-with-class, time [details]
AuthorSterling Clover
UploadedSat Mar 22 19:09:39 UTC 2008 by SterlingClover
DistributionsDebian:0.8.3, FreeBSD:0.8.3, LTSHaskell:0.8.3, NixOS:0.8.3, Stackage:0.8.3
Downloads16886 total (186 in last 30 days)
1 []
StatusDocs uploaded by user
Build status unknown [no reports yet]





Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainers' corner

For package maintainers and hackage trustees

Readme for HStringTemplate-0.3

Module      :  Text.StringTemplate.Base
Copyright   :  (c) Sterling Clover 2008
License     :  BSD 3 Clause
Maintainer  :
Stability   :  experimental
Portability :  portable

A StringTemplate is a String with "holes" in it. This is a port of the Java StringTemplate library written by Terrence Parr. (<>).

This library implements the basic 3.1 grammar, lacking group files (though not groups themselves), Regions, and Interfaces. The goal is not to blindly copy the StringTemplate API, but rather to take its central ideas and implement them in a Haskellish manner. Indentation and wrapping, for example, are implemented through the HughesPJ Pretty Printing library. Calling toPPDoc on a StringTemplate yields a Doc with appropriate paragraph-fill wrapping that can be rendered in the usual fashion.

This library extends the current StringTemplate grammar by allowing the application of alternating attributes to anonymous as well as regular templates, including therefore sets of alternating attributes.

Basic instances are provided of the StringTemplateShows and ToSElem class. Any type deriving ToSElem can be passed automatically as a StringTemplate attribute. This package can be installed with syb-with-class bindings that provide a ToSElem instance for anything deriving 'Data.Generics.SYB.WithClass.Basics.Data'. When defining an instance of ToSElem that can take a format parameter, you should first define an instance of StringTemplateShows, and then define an instance of ToSElem where @ toSElem = stShowsToSE@.

Along with the haddocks, additional documentation and commentary is at