diff options
author | Johannes Gerer <oss@johannesgerer.com> | 2016-10-26 02:07:02 +0200 |
---|---|---|
committer | Johannes Gerer <oss@johannesgerer.com> | 2016-10-26 02:07:02 +0200 |
commit | 675085c2e0b0b851378da08b7d73024766107c87 (patch) | |
tree | 5a927de4a9576aef7e6129b96e74aa5c96f9ffb6 /src/BackwardsCompatibilty.hs | |
download | blazeT-675085c2e0b0b851378da08b7d73024766107c87.tar.gz blazeT-675085c2e0b0b851378da08b7d73024766107c87.tar.zst blazeT-675085c2e0b0b851378da08b7d73024766107c87.zip |
Initial
Diffstat (limited to 'src/BackwardsCompatibilty.hs')
-rw-r--r-- | src/BackwardsCompatibilty.hs | 29 |
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 | |||
6 | import Text.Blaze.Html5.Attributes | ||
7 | #if 1 | ||
8 | import Text.BlazeT | ||
9 | import Text.BlazeT.Html5 hiding (main) | ||
10 | import Text.BlazeT.Renderer.Utf8 | ||
11 | #else | ||
12 | import Text.Blaze | ||
13 | import Text.Blaze.Html5 hiding (main) | ||
14 | import Text.Blaze.Renderer.Utf8 | ||
15 | #endif | ||
16 | |||
17 | main :: IO () | ||
18 | main = 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 | |||