]>
Commit | Line | Data |
---|---|---|
1 | {-# LANGUAGE RankNTypes #-} | |
2 | module Text.BlazeT.Renderer.Text | |
3 | ( renderMarkupBuilder | |
4 | , renderMarkupBuilderWith | |
5 | , renderMarkup | |
6 | , renderMarkupWith | |
7 | , renderHtmlBuilder | |
8 | , renderHtmlBuilderWith | |
9 | , renderHtml | |
10 | , renderHtmlWith | |
11 | ) where | |
12 | ||
13 | import Data.ByteString (ByteString) | |
14 | import Data.Text (Text) | |
15 | import qualified Data.Text.Lazy as L | |
16 | import qualified Data.Text.Lazy.Builder as B | |
17 | import qualified Text.Blaze.Html.Renderer.Text as BH | |
18 | import qualified Text.Blaze.Renderer.Text as BU | |
19 | import Text.BlazeT | |
20 | ||
21 | renderMarkupBuilder :: MarkupM a -> B.Builder | |
22 | renderMarkupBuilder = BU.renderMarkupBuilder . execMarkup | |
23 | ||
24 | renderHtmlBuilder :: MarkupM a -> B.Builder | |
25 | renderHtmlBuilder = renderMarkupBuilder | |
26 | ||
27 | renderMarkup :: MarkupM a -> L.Text | |
28 | renderMarkup = BU.renderMarkup . execMarkup | |
29 | ||
30 | renderHtml :: MarkupM a -> L.Text | |
31 | renderHtml = renderMarkup | |
32 | ||
33 | renderMarkupWith :: (ByteString -> Text) -> MarkupM a -> L.Text | |
34 | renderMarkupWith g = (BH.renderHtmlWith g) . execMarkup | |
35 | ||
36 | renderHtmlWith :: (ByteString -> Text) -> MarkupM a -> L.Text | |
37 | renderHtmlWith = renderMarkupWith | |
38 | ||
39 | renderMarkupBuilderWith :: (ByteString -> Text) -> MarkupM a -> B.Builder | |
40 | renderMarkupBuilderWith g = (BU.renderMarkupBuilderWith g) . execMarkup | |
41 | ||
42 | renderHtmlBuilderWith :: (ByteString -> Text) -> MarkupM a -> B.Builder | |
43 | renderHtmlBuilderWith = renderHtmlBuilderWith | |
44 |