Draft: Literate Haskell Examples
This MR's primary goal is to add literate haskell (.lhs
) versions of the examples, and include their source code to the main website. There are other issues fixed in this MR as well. Listed below are the details:
- Convert a few
examples/
to well documented.lhs
versions (currentlyCounter.lhs
,Calculator.lhs
,Animation.lhs
, andLens.lhs
, also addingHelloWorld.lhs
). - Add the capability to include a
.lhs
file asHtml
, viaembedLhs
(analogous to Shpadoinkle-template'sembedAsciidoc
). This uses Pandoc, and a custom version of HXT, to make the embedded Html more consistent with asciidoc's output. - Remove automatic html ampersand decoding (i.e. turning
<
to<
) fromembedHtml
, and add it to applicable backends instead (Shpadoinkle-backend-static does not need it). This also adds a functiondecodeHtml
incore/
, which avoids using the packagehtml-entities
on GHCjs, as it will cause a stack overflow during linking. This fixes #140 (closed). - Adjust
ParDiffT
to not expose its internalTVar
as aMonadReader
parameter - this fixes #138 (closed). - Adjust Shpadoinkle-backend-pardiff's
stage
function to be exactly the same as Shpadoinkle-backend-snabbdom - clear<body>
before adding content, making behavior more consistent between the two, and fixing #139 (closed). - Adjust Shpadoinkle-backend-pardiff and Shpadoinkle-backend-snabbdom to use
<body>
directly, rather than a needless<div id="stage">
node. - Adds the
.lhs
examples to thewebsite/
. - Fixes snowman's reference to
github.com/athanclark/jsaddle.git
- Fixes snowman's reference to
http://localhost:8080
(instead ofhttps://localhost:8080
) - Fixes #142 by calling
highlight.js-cli
on HTML files statically before being imported withembedHtml
Edited by Athan Clark