2020-01-19 Haskell being a different approach to literate programming

In the #emacs channel today, thblt mentioned that Haskell offers a different approach to literate programming. He added an example as well. Essentially every line is a comment, unless marked otherwise. Exports to text, latex and markdown can be encapsulated within their blocks. The entire document can be compiled before deployment. In this way the code is truly with the text and explanation. Unlike Org mode - where the tangling from org mode headers take place but then there is no way to revert from the tangled material back into org headings. I've definitely experienced the need for this earlier, particularly after the difficulties I faced with Rmarkdown to Org mode conversions.

The problem is as usual that Rmarkdown is a better format to share analyses with people because they do not have access to Org mode. The ideal thing would be develop a function on save or a project publishing setup wherein each time the project is published, or saved - a number exports including markdown, html, Rmd , etc.

This was interesting because I thought that Org mode was the ultimate in literate programming. I guess it was naive to not consider that there would be other approaches. For what it is worth, I do not hear this topic talked about very often.

Related: LiterateProgramming? CodeJournal EmacsStuff