packages feed

ctemplate-0.1: examples/example.hs

module Main where

import qualified Data.ByteString as B
import Text.CTemplate

main = do
  Just bs <- expand DontStrip $ Dictionary "test.tmpl"
    [("NAME", StringV "Adam"), ("S", SectionV [[("VALUE", StringV "0")], [("VALUE", StringV "1")]]),
     ("INCLUDED", IncludedV $ Dictionary "included.tmpl" []),
     ("HTML", StringV "<br>")]
  B.putStr bs