Hacker News new | ask | show | jobs
by ctb_mg 3628 days ago
As someone who knows zero haskell, and little markdown, can someone explain how this works?

haskell.org [1] says there is "bird style" and "LaTeX style" ways of marking off code vs documentation, and I see neither in the linked file. Is it the "```haskell" blocks?

[1] https://wiki.haskell.org/Literate_programming#Haskell_and_li...

1 comments

Yes, that seems to be the syntax used by literate markdown https://ghc.haskell.org/trac/ghc/wiki/LiterateMarkdown
Just some additional info, because literate markdown support is not completly frictionless yet:

To so this yourself you need to add the --markdown-unlit flag to ghc and add the package "markdown-unlit" to your dependencies. Additionally you have to symlink your .md file to .lhs, as ghc does not look at .md files (even with the --markdown-unlit flag, which I find kinda sad)