Deprecated

In favour of

shakespeare-text

Interpolation with quasi-quotation: put variables strings (deprecated)

http://www.yesodweb.com/book/shakespearean-templates

LTS Haskell 23.0:1.1.0
Stackage Nightly 2024-12-13:1.1.0
Latest on Hackage:1.1.0

See all snapshots shakespeare-text appears in

MIT licensed and maintained by Greg Weber
This version can be pinned in stack with:shakespeare-text-1.1.0@sha256:8077064680ae100d8b513d5cb10e033d1128428f157554663458554665234df2,1991

Module documentation for 1.1.0

There are no documented modules for this package.

Depends on 2 packages(full list with versions):

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.com/book/shakespearean-templates for a more thorough description and examples of the shakespeare family of template languages.