
20 Dec
2008
20 Dec
'08
12:31 p.m.
On Sat, Dec 20, 2008 at 4:15 PM, Thomas Hartman
I hate constructing strings with ++. Especially icky when you start dealing with escape characters and stuff.
cabal install HStringTemplateHelpers
.....
import Text.StringTemplate.Helpers putStrLn $ render1 [("name",name)] "Why, hello, $name$"
I once wrote a simple library for "classical" $-substitution. I plan to upgrade it to use Data.Text (efficient bytestring like representation for Unicode strings) whenever that's release. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/template Cheers, Johan