]> git.immae.eu Git - github/fretlink/blazeT.git/blame - src/Readme.hs
added `textComment`
[github/fretlink/blazeT.git] / src / Readme.hs
CommitLineData
95eb4d6a
JG
1{-# LANGUAGE OverloadedStrings #-}
2
3import Data.Time (getCurrentTime)
4import Text.BlazeT.Html5 hiding (main)
5import Text.BlazeT.Renderer.String
6import Control.Monad.Trans.Class (lift)
7
8-- Backwords compatible Blaze HTML
9old :: Markup
10old = do
11 p $ "created with blaze-html"
12
13-- BlazeT HTML with lifted IO actions
14new :: MarkupT IO ()
15new = do
16 time <- lift getCurrentTime
17 p $ string $ "created with blazeT at " ++ show time
18
19main :: IO ()
20main = do
21 putStrLn $ renderMarkup old
22 putStrLn =<< execWith renderMarkup new
23