The shakespeare-text package
interpolation with quasi-quotation: stick haskell variables into haskell strings
Note there is no dependency on haskell-src-extras. If you don't mind that dependency, you may want to look at using these packages: Interpolation, interpolatedstring-perl6, interpolatedstring-qq.
This package has 1 other general feature that those others may not (but would be easy to duplicate): instead of using quasi-quoting you can also use an external file. It also has url/embeding interpolation, with @ and ^, which are used in Yesod.
This package also uses blaze-builder for efficiently constructing strings (I am not sure what the other packages use). This might be of interest to you for large templates or performance sensitive code, or otherwise having a nice interface to blaze-builder
Shakespeare is a template family for type-safe, efficient templates with simple variable interpolation. Shakespeare templates can be used inline with a quasi-quoter or in an external file. Shakespeare interpolates variables according to the type being inserted. In this case, the variable type needs a ToText instance.
Please see http:www.yesodweb.combookshakespearean-templates for a more thorough description and examples of the shakespeare family of template languages.
- No changelog available
|Versions||0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.11, 1.0.0, 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52, 184.108.40.206|
|Dependencies||base (==4.*), shakespeare (==1.0.*), template-haskell, text (>=0.7 && <0.12)|
|Author||Greg Weber <email@example.com>|
|Maintainer||Greg Weber <firstname.lastname@example.org>|
|Source repository||head: git clone git://github.com/yesodweb/shakespeare.git|
|Upload date||Sun Jul 21 09:05:06 UTC 2013|
|Distributions||Debian:220.127.116.11, Fedora:18.104.22.168, FreeBSD:22.214.171.124, NixOS:126.96.36.199|
- shakespeare-text-188.8.131.52.tar.gz [browse] (Cabal source package)
- Package description (included in the package)
For package maintainers and hackage trustees