aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Text/BlazeT.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/BlazeT.hs')
-rw-r--r--src/Text/BlazeT.hs57
1 files changed, 38 insertions, 19 deletions
diff --git a/src/Text/BlazeT.hs b/src/Text/BlazeT.hs
index 27228fa..ffdd89b 100644
--- a/src/Text/BlazeT.hs
+++ b/src/Text/BlazeT.hs
@@ -1,19 +1,24 @@
1{-# LANGUAGE UndecidableInstances #-} 1{-# LANGUAGE UndecidableInstances #-}
2{-# LANGUAGE FlexibleInstances #-} 2{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE RankNTypes #-} 3{-# LANGUAGE RankNTypes #-}
4
4module Text.BlazeT 5module Text.BlazeT
5 ( 6 (
6 -- * Important types. 7 -- * DO NOT READ THIS. READ "Text.BlazeT.Internal" INSTEAD
8 -- $descr
9
10 -- * DO NOT READ THIS
11-- -- * Important types.
7 Markup 12 Markup
8 , Tag 13 , Tag
9 , Attribute 14 , Attribute
10 , AttributeValue 15 , AttributeValue
11 16
12 -- * Creating attributes. 17-- -- * Creating attributes.
13 , dataAttribute 18 , dataAttribute
14 , customAttribute 19 , customAttribute
15 20
16 -- * Converting values to Markup. 21-- -- * Converting values to Markup.
17 , ToMarkup (..) 22 , ToMarkup (..)
18 , text 23 , text
19 , preEscapedText 24 , preEscapedText
@@ -24,19 +29,19 @@ module Text.BlazeT
24 , unsafeByteString 29 , unsafeByteString
25 , unsafeLazyByteString 30 , unsafeLazyByteString
26 31
27 -- * Comments 32-- -- * Comments
28 , textComment 33 , textComment
29 , lazyTextComment 34 , lazyTextComment
30 , stringComment 35 , stringComment
31 , unsafeByteStringComment 36 , unsafeByteStringComment
32 , unsafeLazyByteStringComment 37 , unsafeLazyByteStringComment
33 38
34 -- * Creating tags. 39-- -- * Creating tags.
35 , textTag 40 , textTag
36 , stringTag 41 , stringTag
37 42
38 -- * Converting values to attribute values. 43-- -- * Converting values to attribute values.
39 , B.ToValue (..) 44 , Text.Blaze.ToValue (..)
40 , textValue 45 , textValue
41 , preEscapedTextValue 46 , preEscapedTextValue
42 , lazyTextValue 47 , lazyTextValue
@@ -46,26 +51,28 @@ module Text.BlazeT
46 , unsafeByteStringValue 51 , unsafeByteStringValue
47 , unsafeLazyByteStringValue 52 , unsafeLazyByteStringValue
48 53
49 -- * Setting attributes 54-- -- * Setting attributes
50 , (!) 55 , (!)
51 , (!?) 56 , (!?)
52 57
53 -- * Modifiying Markup trees 58-- -- * Modifiying Markup trees
54 , contents 59 , contents
55 60
56 -- * BlazeT new stuff 61 ,MarkupT(..)
62 ,MarkupI
63 ,mapMarkupT
57 ,MarkupM 64 ,MarkupM
58 ,Markup2 65 ,Markup2
59 ,mapMarkupT
60 ,MarkupT
61 ,runMarkup
62 ,runMarkupT 66 ,runMarkupT
63 ,execMarkup 67 ,runMarkup
68 ,runWith
64 ,execMarkupT 69 ,execMarkupT
70 ,execMarkup
71 ,execWith
65 ) where 72 ) where
66 73
67import qualified Text.Blaze as B 74import qualified Text.Blaze
68import Text.BlazeT.Internal 75import Text.BlazeT.Internal as Text.BlazeT.Internal
69 76
70class ToMarkup a where 77class ToMarkup a where
71 toMarkup :: a -> Markup 78 toMarkup :: a -> Markup
@@ -74,8 +81,20 @@ class ToMarkup a where
74-- test :: (ToMarkup a, Monad m) => a -> MarkupT m () 81-- test :: (ToMarkup a, Monad m) => a -> MarkupT m ()
75-- test = toMarkup 82-- test = toMarkup
76 83
77instance B.ToMarkup a => ToMarkup a where 84instance Text.Blaze.ToMarkup a => ToMarkup a where
78 toMarkup = wrapMarkup . B.toMarkup 85 toMarkup = wrapMarkup . Text.Blaze.toMarkup
79 {-# INLINE toMarkup #-} 86 {-# INLINE toMarkup #-}
80 preEscapedToMarkup = wrapMarkup . B.preEscapedToMarkup 87 preEscapedToMarkup = wrapMarkup . Text.Blaze.preEscapedToMarkup
81 {-# INLINE preEscapedToMarkup #-} 88 {-# INLINE preEscapedToMarkup #-}
89
90
91-- $descr
92--
93-- Due due a Haddock bug, this documentation is misleading. Please
94-- read "Text.BlazeT.Internal" instead.
95--
96-- (The bug shows both @Text.Blaze.Markup@ and @Text.BlazeT.Markup@ as
97-- "Markup".)
98--
99-- Use this documentation only to see which entities are exported by
100-- this module.