The HStringTemplate package

[Tags:bsd3, library]

A port of the Java library by Terrence Parr.


[Skip to Readme]

Properties

Versions 0.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, 0.8.5
Dependencies array, base, bytestring, containers, directory, filepath, old-locale, old-time, parsec, pretty, syb-with-class, time [details]
License BSD3
Author Sterling Clover
Maintainer s.clover@gmail.com
Stability Unknown
Category Text
Uploaded Sun Nov 23 00:48:38 UTC 2008 by SterlingClover
Distributions Debian:0.8.3, FreeBSD:0.8.3, LTSHaskell:0.8.5, NixOS:0.8.5, Stackage:0.8.5, Tumbleweed:0.8.5
Downloads 18289 total (68 in the last 30 days)
Votes
1 []
Status Docs 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

Maintainer's Corner

For package maintainers and hackage trustees

Readme for HStringTemplate

Readme for HStringTemplate-0.4.3

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