]> git.immae.eu Git - github/fretlink/blazeT.git/blame - src/Text/BlazeT.hs
Docs
[github/fretlink/blazeT.git] / src / Text / BlazeT.hs
CommitLineData
675085c2
JG
1{-# LANGUAGE UndecidableInstances #-}
2{-# LANGUAGE FlexibleInstances #-}
3{-# LANGUAGE RankNTypes #-}
95eb4d6a 4
675085c2
JG
5module Text.BlazeT
6 (
95eb4d6a
JG
7 -- * DO NOT READ THIS. READ "Text.BlazeT.Internal" INSTEAD
8 -- $descr
9
10 -- * DO NOT READ THIS
11-- -- * Important types.
675085c2
JG
12 Markup
13 , Tag
14 , Attribute
15 , AttributeValue
16
95eb4d6a 17-- -- * Creating attributes.
675085c2
JG
18 , dataAttribute
19 , customAttribute
20
95eb4d6a 21-- -- * Converting values to Markup.
675085c2
JG
22 , ToMarkup (..)
23 , text
24 , preEscapedText
25 , lazyText
26 , preEscapedLazyText
27 , string
28 , preEscapedString
29 , unsafeByteString
30 , unsafeLazyByteString
31
95eb4d6a 32-- -- * Comments
675085c2
JG
33 , textComment
34 , lazyTextComment
35 , stringComment
36 , unsafeByteStringComment
37 , unsafeLazyByteStringComment
38
95eb4d6a 39-- -- * Creating tags.
675085c2
JG
40 , textTag
41 , stringTag
42
95eb4d6a
JG
43-- -- * Converting values to attribute values.
44 , Text.Blaze.ToValue (..)
675085c2
JG
45 , textValue
46 , preEscapedTextValue
47 , lazyTextValue
48 , preEscapedLazyTextValue
49 , stringValue
50 , preEscapedStringValue
51 , unsafeByteStringValue
52 , unsafeLazyByteStringValue
53
95eb4d6a 54-- -- * Setting attributes
675085c2
JG
55 , (!)
56 , (!?)
57
95eb4d6a 58-- -- * Modifiying Markup trees
675085c2
JG
59 , contents
60
95eb4d6a
JG
61 ,MarkupT(..)
62 ,MarkupI
63 ,mapMarkupT
675085c2
JG
64 ,MarkupM
65 ,Markup2
675085c2 66 ,runMarkupT
95eb4d6a
JG
67 ,runMarkup
68 ,runWith
675085c2 69 ,execMarkupT
95eb4d6a
JG
70 ,execMarkup
71 ,execWith
675085c2
JG
72 ) where
73
95eb4d6a
JG
74import qualified Text.Blaze
75import Text.BlazeT.Internal as Text.BlazeT.Internal
675085c2
JG
76
77class ToMarkup a where
78 toMarkup :: a -> Markup
79 preEscapedToMarkup :: a -> Markup
80
81-- test :: (ToMarkup a, Monad m) => a -> MarkupT m ()
82-- test = toMarkup
83
95eb4d6a
JG
84instance Text.Blaze.ToMarkup a => ToMarkup a where
85 toMarkup = wrapMarkup . Text.Blaze.toMarkup
675085c2 86 {-# INLINE toMarkup #-}
95eb4d6a 87 preEscapedToMarkup = wrapMarkup . Text.Blaze.preEscapedToMarkup
675085c2 88 {-# INLINE preEscapedToMarkup #-}
95eb4d6a
JG
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.