aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/BackwardsCompatibilty.hs
blob: a8733ed41b890cf8a5d26aff8e277b443da13143 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE CPP #-}

import Text.Blaze.Html5.Attributes
#if 1
import Text.BlazeT
import Text.BlazeT.Html5 hiding (main)
import Text.BlazeT.Renderer.Utf8
#else
import Text.Blaze
import Text.Blaze.Html5 hiding (main)
import Text.Blaze.Renderer.Utf8
#endif

main :: IO ()
main = print $ renderMarkup $ do
  docType
  -- "some text" -- does not work
  html $ do text "some text" -- does not work
            br
  ("wow" :: Markup) -- overloaded strings
  text "asd" ! href "asd"
  string "string" ! href "asd"
  toMarkup ("more text" :: String)
  html "wow"
  html ! src "asd" $ br