Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you intend to share programs on the internet, I've found a combination of literate haskell in markdown style with mathjax to be a great combination. The program "Pandoc" is seriously brilliant for taking this "markdown+lhs" to any format you desire, including PDF or HTML. If you tell Pandoc to output to HTML, you can use the -mathjax (or other similar flags if you prefer) to have your latex math formulas render.</p> <p>When using this style, I find bird style to be preferable because it just is more readable to me and seems to fit along with the markdown style better.</p> <p>The great thing about using Pandoc with markdown is that you can add citations to your code, math formulas, and have a really portable format. You can build something that resembles a scientific research paper but is executable and can also be posted to blogs/wikis/websites.</p> <p>To give an alternative point to Norman where he says that literate programming is useful for clearer code arrangement, it could be argued that Haskell is expressive enough that the problems you solve with the code are actually interesting and can really benefit by being surrounded with explanatory text. Think of a mathematical research paper. Good papers in pure mathematics have a lot of text to explain the motivation or higher-level interpretations of what the mathematical notation means. In a paper about the Navier-Stokes equations, for example, it would be super useful to surround the notation of the equations with text explaining how it relates to Newton's conservation of momentum.</p> <p>In summary, I have had good success with, and recommend, using markdown+lhs style, dollar signs to embed latex math formulas, bird style, and pandoc. I would recommend writing programs as if they were research papers and treat the haskell itself as you would mathematical expressions in a research paper.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload