aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Text/BlazeT/Renderer/Utf8.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/BlazeT/Renderer/Utf8.hs')
-rw-r--r--src/Text/BlazeT/Renderer/Utf8.hs35
1 files changed, 5 insertions, 30 deletions
diff --git a/src/Text/BlazeT/Renderer/Utf8.hs b/src/Text/BlazeT/Renderer/Utf8.hs
index 292f81f..2874b68 100644
--- a/src/Text/BlazeT/Renderer/Utf8.hs
+++ b/src/Text/BlazeT/Renderer/Utf8.hs
@@ -1,3 +1,4 @@
1{-# LANGUAGE RankNTypes #-}
1{-# OPTIONS_GHC -fsimpl-tick-factor=230 #-} 2{-# OPTIONS_GHC -fsimpl-tick-factor=230 #-}
2 3
3-- the above option was not needed with 4-- the above option was not needed with
@@ -13,54 +14,28 @@ module Text.BlazeT.Renderer.Utf8
13 , renderHtmlBuilder 14 , renderHtmlBuilder
14 , renderHtml 15 , renderHtml
15 , renderHtmlToByteStringIO 16 , renderHtmlToByteStringIO
16
17 -- * new BlazeT stuff
18 , renderMarkupBuilderT
19 , renderMarkupT
20 , renderMarkupToByteStringIOT
21 , renderHtmlToByteStringIOT
22 , renderHtmlBuilderT
23 , renderHtmlT
24 ) where 17 ) where
25 18
26import qualified Blaze.ByteString.Builder as B 19import qualified Blaze.ByteString.Builder as B
27import Control.Monad
28import Control.Monad.Identity
29import qualified Data.ByteString as BS 20import qualified Data.ByteString as BS
30import qualified Data.ByteString.Lazy as BL 21import qualified Data.ByteString.Lazy as BL
31import qualified Text.Blaze.Renderer.Utf8 as BU 22import qualified Text.Blaze.Renderer.Utf8 as BU
32import Text.BlazeT 23import Text.BlazeT
33 24
34renderMarkupBuilder :: MarkupM a -> B.Builder 25renderMarkupBuilder :: MarkupM a -> B.Builder
35renderMarkupBuilder = runIdentity . renderMarkupBuilderT 26renderMarkupBuilder = BU.renderMarkupBuilder . execMarkup
36
37renderMarkupBuilderT :: Monad m => MarkupT m a -> m B.Builder
38renderMarkupBuilderT = liftM BU.renderMarkupBuilder . execMarkupT
39 27
40renderHtmlBuilder :: MarkupM a -> B.Builder 28renderHtmlBuilder :: MarkupM a -> B.Builder
41renderHtmlBuilder = renderMarkupBuilder 29renderHtmlBuilder = renderMarkupBuilder
42 30
43renderHtmlBuilderT :: Monad m => MarkupT m a -> m B.Builder
44renderHtmlBuilderT = renderMarkupBuilderT
45
46renderMarkup :: MarkupM a -> BL.ByteString 31renderMarkup :: MarkupM a -> BL.ByteString
47renderMarkup = runIdentity . renderMarkupT 32renderMarkup = BU.renderMarkup . execMarkup
48renderMarkupT :: Monad m => MarkupT m a -> m BL.ByteString
49renderMarkupT = liftM BU.renderMarkup . execMarkupT
50 33
51renderHtml :: MarkupM a -> BL.ByteString 34renderHtml :: MarkupM a -> BL.ByteString
52renderHtml = renderMarkup 35renderHtml = renderMarkup
53renderHtmlT :: Monad m => MarkupT m a -> m BL.ByteString
54renderHtmlT = renderMarkupT
55 36
56renderMarkupToByteStringIO :: (BS.ByteString -> IO ()) -> MarkupM a -> IO () 37renderMarkupToByteStringIO :: (BS.ByteString -> IO ()) -> MarkupM a -> IO ()
57renderMarkupToByteStringIO g = runIdentity . renderMarkupToByteStringIOT g 38renderMarkupToByteStringIO g = BU.renderMarkupToByteStringIO g . execMarkup
58renderMarkupToByteStringIOT :: Monad m => (BS.ByteString -> IO ()) ->
59 MarkupT m a -> m (IO ())
60renderMarkupToByteStringIOT g = liftM (BU.renderMarkupToByteStringIO g) . execMarkupT
61 39
62renderHtmlToByteStringIO :: (BS.ByteString -> IO ()) -> MarkupM a -> IO () 40renderHtmlToByteStringIO :: (BS.ByteString -> IO ()) -> MarkupM a -> IO ()
63renderHtmlToByteStringIO g = runIdentity . renderMarkupToByteStringIOT g 41renderHtmlToByteStringIO = renderMarkupToByteStringIO
64renderHtmlToByteStringIOT :: Monad m => (BS.ByteString -> IO ()) ->
65 MarkupT m a -> m (IO ())
66renderHtmlToByteStringIOT g = liftM (BU.renderMarkupToByteStringIO g) . execMarkupT