/usr/share/doc/libghc-blaze-markup-doc/html/src/Text-Blaze-Renderer-Utf8.html is in libghc-blaze-markup-doc 0.8.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
<title>src/Text/Blaze/Renderer/Utf8.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-comment'>{-# LANGUAGE OverloadedStrings #-}</span>
<a name="line-2"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>Text</span><span class='hs-varop'>.</span><span class='hs-conid'>Blaze</span><span class='hs-varop'>.</span><span class='hs-conid'>Renderer</span><span class='hs-varop'>.</span><span class='hs-conid'>Utf8</span>
<a name="line-3"></a> <span class='hs-layout'>(</span> <span class='hs-varid'>renderMarkupBuilder</span>
<a name="line-4"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>renderMarkup</span>
<a name="line-5"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>renderMarkupToByteStringIO</span>
<a name="line-6"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>renderHtmlBuilder</span>
<a name="line-7"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>renderHtml</span>
<a name="line-8"></a> <span class='hs-layout'>,</span> <span class='hs-varid'>renderHtmlToByteStringIO</span>
<a name="line-9"></a> <span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-10"></a>
<a name="line-11"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Monoid</span> <span class='hs-layout'>(</span><span class='hs-varid'>mappend</span><span class='hs-layout'>,</span> <span class='hs-varid'>mempty</span><span class='hs-layout'>)</span>
<a name="line-12"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>List</span> <span class='hs-layout'>(</span><span class='hs-varid'>isInfixOf</span><span class='hs-layout'>)</span>
<a name="line-13"></a>
<a name="line-14"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>Lazy</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>L</span>
<a name="line-15"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Text</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>T</span> <span class='hs-layout'>(</span><span class='hs-varid'>isInfixOf</span><span class='hs-layout'>)</span>
<a name="line-16"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>S</span> <span class='hs-layout'>(</span><span class='hs-conid'>ByteString</span><span class='hs-layout'>,</span> <span class='hs-varid'>isInfixOf</span><span class='hs-layout'>)</span>
<a name="line-17"></a>
<a name="line-18"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Text</span><span class='hs-varop'>.</span><span class='hs-conid'>Blaze</span><span class='hs-varop'>.</span><span class='hs-conid'>Internal</span>
<a name="line-19"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Blaze</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>Builder</span> <span class='hs-layout'>(</span><span class='hs-conid'>Builder</span><span class='hs-layout'>)</span>
<a name="line-20"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Blaze</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>Builder</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>B</span>
<a name="line-21"></a><span class='hs-keyword'>import</span> <span class='hs-keyword'>qualified</span> <span class='hs-conid'>Blaze</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span><span class='hs-varop'>.</span><span class='hs-conid'>Builder</span><span class='hs-varop'>.</span><span class='hs-conid'>Html</span><span class='hs-varop'>.</span><span class='hs-conid'>Utf8</span> <span class='hs-keyword'>as</span> <span class='hs-conid'>B</span>
<a name="line-22"></a>
<a name="line-23"></a><a name="fromChoiceString"></a><span class='hs-comment'>-- | Render a 'ChoiceString'.</span>
<a name="line-24"></a><span class='hs-comment'>--</span>
<a name="line-25"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>ChoiceString</span> <span class='hs-comment'>-- ^ String to render</span>
<a name="line-26"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Builder</span> <span class='hs-comment'>-- ^ Resulting builder</span>
<a name="line-27"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-layout'>(</span><span class='hs-conid'>Static</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>copyByteString</span> <span class='hs-varop'>$</span> <span class='hs-varid'>getUtf8ByteString</span> <span class='hs-varid'>s</span>
<a name="line-28"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-layout'>(</span><span class='hs-conid'>String</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromHtmlEscapedString</span> <span class='hs-varid'>s</span>
<a name="line-29"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-layout'>(</span><span class='hs-conid'>Text</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromHtmlEscapedText</span> <span class='hs-varid'>s</span>
<a name="line-30"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-layout'>(</span><span class='hs-conid'>ByteString</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromByteString</span> <span class='hs-varid'>s</span>
<a name="line-31"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-layout'>(</span><span class='hs-conid'>PreEscaped</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>x</span> <span class='hs-keyword'>of</span>
<a name="line-32"></a> <span class='hs-conid'>String</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromString</span> <span class='hs-varid'>s</span>
<a name="line-33"></a> <span class='hs-conid'>Text</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromText</span> <span class='hs-varid'>s</span>
<a name="line-34"></a> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>s</span>
<a name="line-35"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-layout'>(</span><span class='hs-conid'>External</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyword'>case</span> <span class='hs-varid'>x</span> <span class='hs-keyword'>of</span>
<a name="line-36"></a> <span class='hs-comment'>-- Check that the sequence "</" is *not* in the external data.</span>
<a name="line-37"></a> <span class='hs-conid'>String</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>if</span> <span class='hs-str'>"</"</span> <span class='hs-varop'>`isInfixOf`</span> <span class='hs-varid'>s</span> <span class='hs-keyword'>then</span> <span class='hs-varid'>mempty</span> <span class='hs-keyword'>else</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromString</span> <span class='hs-varid'>s</span>
<a name="line-38"></a> <span class='hs-conid'>Text</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>if</span> <span class='hs-str'>"</"</span> <span class='hs-varop'>`</span><span class='hs-conid'>T</span><span class='hs-varop'>.</span><span class='hs-varid'>isInfixOf</span><span class='hs-varop'>`</span> <span class='hs-varid'>s</span> <span class='hs-keyword'>then</span> <span class='hs-varid'>mempty</span> <span class='hs-keyword'>else</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromText</span> <span class='hs-varid'>s</span>
<a name="line-39"></a> <span class='hs-conid'>ByteString</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyword'>if</span> <span class='hs-str'>"</"</span> <span class='hs-varop'>`</span><span class='hs-conid'>S</span><span class='hs-varop'>.</span><span class='hs-varid'>isInfixOf</span><span class='hs-varop'>`</span> <span class='hs-varid'>s</span> <span class='hs-keyword'>then</span> <span class='hs-varid'>mempty</span> <span class='hs-keyword'>else</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromByteString</span> <span class='hs-varid'>s</span>
<a name="line-40"></a> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-></span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>s</span>
<a name="line-41"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-layout'>(</span><span class='hs-conid'>AppendChoiceString</span> <span class='hs-varid'>x</span> <span class='hs-varid'>y</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-42"></a> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>x</span> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>y</span>
<a name="line-43"></a><span class='hs-definition'>fromChoiceString</span> <span class='hs-conid'>EmptyChoiceString</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>mempty</span>
<a name="line-44"></a><span class='hs-comment'>{-# INLINE fromChoiceString #-}</span>
<a name="line-45"></a>
<a name="line-46"></a><a name="renderMarkupBuilder"></a><span class='hs-comment'>-- | Render some 'Markup' to a 'Builder'.</span>
<a name="line-47"></a><span class='hs-comment'>--</span>
<a name="line-48"></a><span class='hs-definition'>renderMarkupBuilder</span><span class='hs-layout'>,</span> <span class='hs-varid'>renderHtmlBuilder</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Markup</span> <span class='hs-comment'>-- ^ Markup to render</span>
<a name="line-49"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Builder</span> <span class='hs-comment'>-- ^ Resulting builder</span>
<a name="line-50"></a><span class='hs-definition'>renderMarkupBuilder</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>go</span> <span class='hs-varid'>mempty</span>
<a name="line-51"></a> <span class='hs-keyword'>where</span>
<a name="line-52"></a> <span class='hs-varid'>go</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Builder</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>MarkupM</span> <span class='hs-varid'>b</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Builder</span>
<a name="line-53"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-layout'>(</span><span class='hs-conid'>Parent</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>open</span> <span class='hs-varid'>close</span> <span class='hs-varid'>content</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-54"></a> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>copyByteString</span> <span class='hs-layout'>(</span><span class='hs-varid'>getUtf8ByteString</span> <span class='hs-varid'>open</span><span class='hs-layout'>)</span>
<a name="line-55"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>attrs</span>
<a name="line-56"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>'>'</span>
<a name="line-57"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>go</span> <span class='hs-varid'>mempty</span> <span class='hs-varid'>content</span>
<a name="line-58"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>copyByteString</span> <span class='hs-layout'>(</span><span class='hs-varid'>getUtf8ByteString</span> <span class='hs-varid'>close</span><span class='hs-layout'>)</span>
<a name="line-59"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-layout'>(</span><span class='hs-conid'>CustomParent</span> <span class='hs-varid'>tag</span> <span class='hs-varid'>content</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-60"></a> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>'<'</span>
<a name="line-61"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>tag</span>
<a name="line-62"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>attrs</span>
<a name="line-63"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>'>'</span>
<a name="line-64"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>go</span> <span class='hs-varid'>mempty</span> <span class='hs-varid'>content</span>
<a name="line-65"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromByteString</span> <span class='hs-str'>"</"</span>
<a name="line-66"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>tag</span>
<a name="line-67"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>'>'</span>
<a name="line-68"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-layout'>(</span><span class='hs-conid'>Leaf</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>begin</span> <span class='hs-varid'>end</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-69"></a> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>copyByteString</span> <span class='hs-layout'>(</span><span class='hs-varid'>getUtf8ByteString</span> <span class='hs-varid'>begin</span><span class='hs-layout'>)</span>
<a name="line-70"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>attrs</span>
<a name="line-71"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>copyByteString</span> <span class='hs-layout'>(</span><span class='hs-varid'>getUtf8ByteString</span> <span class='hs-varid'>end</span><span class='hs-layout'>)</span>
<a name="line-72"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-layout'>(</span><span class='hs-conid'>CustomLeaf</span> <span class='hs-varid'>tag</span> <span class='hs-varid'>close</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-73"></a> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>'<'</span>
<a name="line-74"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>tag</span>
<a name="line-75"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>attrs</span>
<a name="line-76"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-layout'>(</span><span class='hs-keyword'>if</span> <span class='hs-varid'>close</span> <span class='hs-keyword'>then</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromByteString</span> <span class='hs-str'>" />"</span> <span class='hs-keyword'>else</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>'>'</span><span class='hs-layout'>)</span>
<a name="line-77"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-layout'>(</span><span class='hs-conid'>AddAttribute</span> <span class='hs-keyword'>_</span> <span class='hs-varid'>key</span> <span class='hs-varid'>value</span> <span class='hs-varid'>h</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-78"></a> <span class='hs-varid'>go</span> <span class='hs-layout'>(</span><span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>copyByteString</span> <span class='hs-layout'>(</span><span class='hs-varid'>getUtf8ByteString</span> <span class='hs-varid'>key</span><span class='hs-layout'>)</span>
<a name="line-79"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>value</span>
<a name="line-80"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>'"'</span>
<a name="line-81"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>attrs</span><span class='hs-layout'>)</span> <span class='hs-varid'>h</span>
<a name="line-82"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-layout'>(</span><span class='hs-conid'>AddCustomAttribute</span> <span class='hs-varid'>key</span> <span class='hs-varid'>value</span> <span class='hs-varid'>h</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-83"></a> <span class='hs-varid'>go</span> <span class='hs-layout'>(</span><span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>' '</span>
<a name="line-84"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>key</span>
<a name="line-85"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromByteString</span> <span class='hs-str'>"=\""</span>
<a name="line-86"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>value</span>
<a name="line-87"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromChar</span> <span class='hs-chr'>'"'</span>
<a name="line-88"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>attrs</span><span class='hs-layout'>)</span> <span class='hs-varid'>h</span>
<a name="line-89"></a> <span class='hs-varid'>go</span> <span class='hs-keyword'>_</span> <span class='hs-layout'>(</span><span class='hs-conid'>Content</span> <span class='hs-varid'>content</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>content</span>
<a name="line-90"></a> <span class='hs-varid'>go</span> <span class='hs-keyword'>_</span> <span class='hs-layout'>(</span><span class='hs-conid'>Comment</span> <span class='hs-varid'>comment</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span>
<a name="line-91"></a> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromByteString</span> <span class='hs-str'>"<!-- "</span>
<a name="line-92"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>fromChoiceString</span> <span class='hs-varid'>comment</span>
<a name="line-93"></a> <span class='hs-varop'>`mappend`</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>fromByteString</span> <span class='hs-str'>" -->"</span>
<a name="line-94"></a> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-layout'>(</span><span class='hs-conid'>Append</span> <span class='hs-varid'>h1</span> <span class='hs-varid'>h2</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-varid'>h1</span> <span class='hs-varop'>`mappend`</span> <span class='hs-varid'>go</span> <span class='hs-varid'>attrs</span> <span class='hs-varid'>h2</span>
<a name="line-95"></a> <span class='hs-varid'>go</span> <span class='hs-keyword'>_</span> <span class='hs-layout'>(</span><span class='hs-conid'>Empty</span> <span class='hs-keyword'>_</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>mempty</span>
<a name="line-96"></a> <span class='hs-comment'>{-# NOINLINE go #-}</span>
<a name="line-97"></a><span class='hs-comment'>{-# INLINE renderMarkupBuilder #-}</span>
<a name="line-98"></a>
<a name="line-99"></a><a name="renderHtmlBuilder"></a><span class='hs-definition'>renderHtmlBuilder</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>renderMarkupBuilder</span>
<a name="line-100"></a><span class='hs-comment'>{-# INLINE renderHtmlBuilder #-}</span>
<a name="line-101"></a><span class='hs-comment'>{-# DEPRECATED renderHtmlBuilder
<a name="line-102"></a> "Use renderHtmlBuilder from Text.Blaze.Html.Renderer.Utf8 instead" #-}</span>
<a name="line-103"></a>
<a name="line-104"></a><a name="renderMarkup"></a><span class='hs-comment'>-- | Render HTML to a lazy UTF-8 encoded 'L.ByteString.'</span>
<a name="line-105"></a><span class='hs-comment'>--</span>
<a name="line-106"></a><span class='hs-definition'>renderMarkup</span><span class='hs-layout'>,</span> <span class='hs-varid'>renderHtml</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Markup</span> <span class='hs-comment'>-- ^ Markup to render</span>
<a name="line-107"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>L</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-comment'>-- ^ Resulting 'L.ByteString'</span>
<a name="line-108"></a><span class='hs-definition'>renderMarkup</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>toLazyByteString</span> <span class='hs-varop'>.</span> <span class='hs-varid'>renderMarkupBuilder</span>
<a name="line-109"></a><span class='hs-comment'>{-# INLINE renderMarkup #-}</span>
<a name="line-110"></a>
<a name="line-111"></a><a name="renderHtml"></a><span class='hs-definition'>renderHtml</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>renderMarkup</span>
<a name="line-112"></a><span class='hs-comment'>{-# INLINE renderHtml #-}</span>
<a name="line-113"></a><span class='hs-comment'>{-# DEPRECATED renderHtml
<a name="line-114"></a> "Use renderHtml from Text.Blaze.Html.Renderer.Utf8 instead" #-}</span>
<a name="line-115"></a>
<a name="line-116"></a>
<a name="line-117"></a><a name="renderMarkupToByteStringIO"></a><span class='hs-comment'>-- | Repeatedly render HTML to a buffer and process this buffer using the given</span>
<a name="line-118"></a><span class='hs-comment'>-- IO action.</span>
<a name="line-119"></a><span class='hs-comment'>--</span>
<a name="line-120"></a><span class='hs-definition'>renderMarkupToByteStringIO</span><span class='hs-layout'>,</span> <span class='hs-varid'>renderHtmlToByteStringIO</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>S</span><span class='hs-varop'>.</span><span class='hs-conid'>ByteString</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span><span class='hs-layout'>)</span>
<a name="line-121"></a> <span class='hs-comment'>-- ^ IO action to execute per rendered buffer</span>
<a name="line-122"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Markup</span> <span class='hs-comment'>-- ^ Markup to render</span>
<a name="line-123"></a> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>IO</span> <span class='hs-conid'>()</span> <span class='hs-comment'>-- ^ Resulting IO action</span>
<a name="line-124"></a><span class='hs-definition'>renderMarkupToByteStringIO</span> <span class='hs-varid'>io</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>B</span><span class='hs-varop'>.</span><span class='hs-varid'>toByteStringIO</span> <span class='hs-varid'>io</span> <span class='hs-varop'>.</span> <span class='hs-varid'>renderMarkupBuilder</span>
<a name="line-125"></a><span class='hs-comment'>{-# INLINE renderMarkupToByteStringIO #-}</span>
<a name="line-126"></a>
<a name="line-127"></a><a name="renderHtmlToByteStringIO"></a><span class='hs-definition'>renderHtmlToByteStringIO</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>renderMarkupToByteStringIO</span>
<a name="line-128"></a><span class='hs-comment'>{-# INLINE renderHtmlToByteStringIO #-}</span>
<a name="line-129"></a><span class='hs-comment'>{-# DEPRECATED renderHtmlToByteStringIO
<a name="line-130"></a> "Use renderMarkupToByteStringIO from Text.Blaze.Html.Renderer.Utf8 instead" #-}</span>
</pre></body>
</html>
|