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/Text/BlazeT/Renderer/String.hs | |
download | blazeT-675085c2e0b0b851378da08b7d73024766107c87.tar.gz blazeT-675085c2e0b0b851378da08b7d73024766107c87.tar.zst blazeT-675085c2e0b0b851378da08b7d73024766107c87.zip |
Initial
Diffstat (limited to 'src/Text/BlazeT/Renderer/String.hs')
-rw-r--r-- | src/Text/BlazeT/Renderer/String.hs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Text/BlazeT/Renderer/String.hs b/src/Text/BlazeT/Renderer/String.hs new file mode 100644 index 0000000..0a2de8a --- /dev/null +++ b/src/Text/BlazeT/Renderer/String.hs | |||
@@ -0,0 +1,27 @@ | |||
1 | module Text.BlazeT.Renderer.String | ||
2 | ( fromChoiceString | ||
3 | , renderMarkup | ||
4 | , renderHtml | ||
5 | , renderMarkupT | ||
6 | , renderHtmlT | ||
7 | ) where | ||
8 | |||
9 | import Control.Monad | ||
10 | import Control.Monad.Identity | ||
11 | import Text.Blaze.Internal (ChoiceString) | ||
12 | import qualified Text.Blaze.Renderer.String as BU | ||
13 | import Text.BlazeT | ||
14 | |||
15 | fromChoiceString :: ChoiceString -> String -> String | ||
16 | fromChoiceString = BU.fromChoiceString | ||
17 | |||
18 | renderMarkup :: MarkupM a -> String | ||
19 | renderMarkup = runIdentity . renderMarkupT | ||
20 | renderMarkupT :: Monad m => MarkupT m a -> m String | ||
21 | renderMarkupT = liftM BU.renderMarkup . execMarkupT | ||
22 | |||
23 | renderHtml :: MarkupM a -> String | ||
24 | renderHtml = renderMarkup | ||
25 | renderHtmlT :: Monad m => MarkupT m a -> m String | ||
26 | renderHtmlT = renderMarkupT | ||
27 | |||