aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/BackwardsCompatibilty.hs
diff options
context:
space:
mode:
authorJohannes Gerer <oss@johannesgerer.com>2016-10-26 02:07:02 +0200
committerJohannes Gerer <oss@johannesgerer.com>2016-10-26 02:07:02 +0200
commit675085c2e0b0b851378da08b7d73024766107c87 (patch)
tree5a927de4a9576aef7e6129b96e74aa5c96f9ffb6 /src/BackwardsCompatibilty.hs
downloadblazeT-675085c2e0b0b851378da08b7d73024766107c87.tar.gz
blazeT-675085c2e0b0b851378da08b7d73024766107c87.tar.zst
blazeT-675085c2e0b0b851378da08b7d73024766107c87.zip
Initial
Diffstat (limited to 'src/BackwardsCompatibilty.hs')
-rw-r--r--src/BackwardsCompatibilty.hs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/BackwardsCompatibilty.hs b/src/BackwardsCompatibilty.hs
new file mode 100644
index 0000000..a8733ed
--- /dev/null
+++ b/src/BackwardsCompatibilty.hs
@@ -0,0 +1,29 @@
1{-# LANGUAGE OverloadedStrings #-}
2{-# LANGUAGE NoMonomorphismRestriction #-}
3{-# LANGUAGE RankNTypes #-}
4{-# LANGUAGE CPP #-}
5
6import Text.Blaze.Html5.Attributes
7#if 1
8import Text.BlazeT
9import Text.BlazeT.Html5 hiding (main)
10import Text.BlazeT.Renderer.Utf8
11#else
12import Text.Blaze
13import Text.Blaze.Html5 hiding (main)
14import Text.Blaze.Renderer.Utf8
15#endif
16
17main :: IO ()
18main = print $ renderMarkup $ do
19 docType
20 -- "some text" -- does not work
21 html $ do text "some text" -- does not work
22 br
23 ("wow" :: Markup) -- overloaded strings
24 text "asd" ! href "asd"
25 string "string" ! href "asd"
26 toMarkup ("more text" :: String)
27 html "wow"
28 html ! src "asd" $ br
29