by pierrec · 10y ago · 0 comments
https://github.com/jameysharp/corrode/blob/master/src/Langua...
Kinda taking Rust's doc unit tests format to a whole new level.
-- foo is a function
foo :: String -> String
It's foo is a function
> foo :: String -> Stringhaskell.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...
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)