[Haskell-cafe] Re: I hate constructing strings with ++

Thomas Hartman tphyahoo at gmail.com
Sat Dec 20 10:16:38 EST 2008


Correction:

> name = "Bill"
> import Text.StringTemplate.Helpers
> putStrLn $ render1 [("name",name)] "Why, hello, $name$"


2008/12/20 Thomas Hartman <tphyahoo at gmail.com>:
> I hate constructing strings with ++. Especially icky when you start
> dealing with escape character and stuff.
>
> cabal install HStringTemplateHelpers
>
> .....
>
> import Text.StringTemplate.Helpers
> putStrLn $ render1 [("name",name)] "Why, hello, $name$"
>
> just thinkin out loud :)
>
> (originally at http://www.reddit.com/r/programming/comments/7khkd/the_fun_of_programming_a_collection_of_haskell/p6iP)
>


More information about the Haskell-Cafe mailing list