Skip to content

Commit c033884

Browse files
Merge pull request #125 from chrisdone/cd/2026-04-28-update-docs
Update docs
2 parents 13b81a2 + 82c2087 commit c033884

4 files changed

Lines changed: 29 additions & 5 deletions

File tree

docs/api/index.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

docs/examples/index.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,4 +774,27 @@ <h2>42-primcase.hell</h2><div class="sourceCode" id="cb1"><pre
774774
<span id="cb1-54"><a href="#cb1-54" aria-hidden="true" tabindex="-1"></a> bool <span class="op">$</span> <span class="dt">Json.Null</span></span>
775775
<span id="cb1-55"><a href="#cb1-55" aria-hidden="true" tabindex="-1"></a> bool <span class="op">$</span> <span class="dt">Json.Number</span> <span class="fl">123.0</span></span>
776776
<span id="cb1-56"><a href="#cb1-56" aria-hidden="true" tabindex="-1"></a> bool <span class="op">$</span> <span class="dt">Json.Bool</span> <span class="dt">Bool</span><span class="op">.</span><span class="dt">True</span></span></code></pre></div>
777+
<h2>43-http.hell</h2><div class="sourceCode" id="cb1"><pre
778+
class="sourceCode haskell"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>main <span class="ot">=</span> <span class="kw">do</span></span>
779+
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> Http.run <span class="dv">8080</span> \request respond <span class="ot">-&gt;</span></span>
780+
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="kw">if</span> <span class="dt">Eq</span><span class="op">.</span>eq (Http.pathInfo request) []</span>
781+
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">then</span></span>
782+
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">case</span> List.lookup (CI.mk <span class="op">$</span> Text.encodeUtf8 <span class="st">&quot;Content-Type&quot;</span>) (Http.requestHeaders request) <span class="kw">of</span></span>
783+
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">Maybe</span><span class="op">.</span><span class="dt">Just</span> _x <span class="ot">-&gt;</span></span>
784+
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> respond <span class="op">$</span> Http.responseBuilder (Http.mkStatus <span class="dv">200</span> <span class="st">&quot;OK&quot;</span>) [] <span class="op">$</span></span>
785+
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> Builder.byteString <span class="op">$</span> Text.encodeUtf8 <span class="st">&quot;Hello, World!&quot;</span></span>
786+
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">Maybe</span><span class="op">.</span><span class="dt">Nothing</span> <span class="ot">-&gt;</span></span>
787+
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a> respond <span class="op">$</span> Http.responseBuilder (Http.mkStatus <span class="dv">500</span> <span class="st">&quot;Error&quot;</span>) [] <span class="op">$</span></span>
788+
<span id="cb1-11"><a href="#cb1-11" aria-hidden="true" tabindex="-1"></a> (Builder.byteString <span class="op">$</span> Text.encodeUtf8 <span class="st">&quot;Wobble&quot;</span>) <span class="op">&lt;&gt;</span></span>
789+
<span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a> (Builder.byteString <span class="op">$</span> Text.encodeUtf8 <span class="st">&quot;Wobble&quot;</span>)</span>
790+
<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">else</span></span>
791+
<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a> respond <span class="op">$</span></span>
792+
<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a> Http.responseFile (Http.mkStatus <span class="dv">400</span> <span class="st">&quot;Not Found&quot;</span>)</span>
793+
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a> [(CI.mk (Text.encodeUtf8 <span class="st">&quot;Content-Type&quot;</span>), Text.encodeUtf8 <span class="st">&quot;text/markdown&quot;</span>)]</span>
794+
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;docs/readme.md&quot;</span></span>
795+
<span id="cb1-18"><a href="#cb1-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">Maybe</span><span class="op">.</span><span class="dt">Nothing</span></span></code></pre></div>
796+
<h2>44-char.hell</h2><div class="sourceCode" id="cb1"><pre
797+
class="sourceCode haskell"><code class="sourceCode haskell"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>main <span class="ot">=</span> <span class="kw">do</span></span>
798+
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> line <span class="ot">&lt;-</span> Text.getLine</span>
799+
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">IO</span><span class="op">.</span><span class="fu">print</span> <span class="op">$</span> Text.all (<span class="dt">Eq</span><span class="op">.</span>eq <span class="ch">&#39;x&#39;</span>) line</span></code></pre></div>
777800
</html>

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
haskell-language-server
3838
fourmolu
3939
hlint
40+
pkgs.pandoc
4041
pkgs.zlib
4142
];
4243
};

scripts/gen-docs.hell

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ main = do
33
let script = Text.unlines [":l src/Hell.hs", "_generateApiDocs", ":quit"]
44
_out <- ByteString.readProcess_
55
(Text.setStdin script
6-
(Process.proc "stack" ["ghci","--no-load"]))
6+
(Process.proc "cabal" ["repl"]))
77
examples <- Directory.listDirectory "examples/"
88
let render = \fp -> do
99
Text.putStrLn $ Text.concat ["Rendering ", fp]

0 commit comments

Comments
 (0)