There are two schools of thought when it comes to documenting programs and libraries: some embed fragments of code within the documentation (so called “literate programming”) and others embed fragments of documentation in their code (i.e. comments). The “comments” approach makes it easy to generate API documentation and the like (a feature built-in to Haskell’s Hackage system) but help me write blog posts and other documents containing code, which is where literate programming shines. Happily, Haskell supports both of these approaches and has a few rather useful tools available to make both easier. In this post, I’ll describe how to take literate Haskell with Markdown formatted text and produce syntax highlighted documents in HTML and PDF.
Andrew Binstock and Donald Knuth converse on the success of open source, the problem with multicore architecture, the disappointing lack of interest in literate programming, the menace of reusable code, and that urban legend about winning a programming contest with a single compilation.
Welcome to LiteratePrograms! LiteratePrograms is a unique wiki where every article is simultaneously a document and a piece of code that you can view, download, compile, and run by simply using the "download code" tab at the top of every article. See Inse
J. Palmer, and E. Hillenbrand. Proceeding of the 24th ACM SIGPLAN conference companion on Object oriented programming systems languages and applications, page 1007--1014. New York, NY, USA, ACM, (2009)
J. Singer. Proceedings of the 10th SIGPLAN symposium on New ideas, new paradigms, and reflections on programming and software, page 91--102. New York, NY, USA, ACM, (2011)
V. Pieterse, D. Kourie, and A. Boake. SAICSIT '04: Proceedings of the 2004 annual research conference of the South African institute of computer scientists and information technologists on IT research in developing countries, page 2--9. , Republic of South Africa, South African Institute for Computer Scientists and Information Technologists, (2004)http://portal.acm.org/citation.cfm?id=1035054.