The HStringTemplate package

[Tags: bsd3, library]

A port of the Java library by Terrence Parr.


[Skip to ReadMe]

Properties

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.5.1.1, 0.5.1.2, 0.5.1.3, 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]
LicenseBSD3
AuthorSterling Clover
Maintainers.clover@gmail.com
CategoryText
UploadedSat Aug 16 03:01:43 UTC 2008 by SterlingClover
DistributionsDebian:0.8.3, FreeBSD:0.8.3, LTSHaskell:0.8.3, NixOS:0.8.3, Stackage:0.8.3
Downloads15939 total (591 in last 30 days)
Votes
1 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Flags

NameDescriptionDefaultType
small-baseEnabledAutomatic
syb-with-classEnabledAutomatic
simple-genericsEnabledAutomatic

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

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for HStringTemplate-0.3.2

Module      :  Text.StringTemplate.Base
Copyright   :  (c) Sterling Clover 2008
License     :  BSD 3 Clause
Maintainer  :  s.clover@gmail.com
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. (<http://www.stringtemplate.org>).

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 http://fmapfixreturn.wordpress.com