In an effort to better document my Haskell experiments I wrote a set of reST directives for Sweave-like literate programming.
What makes rstweaver different from Sweave is that a single reST document can write and execute multiple source files, in stages, and parts can be inserted or modified, then reexecuted. This gives the illusion of an interactive session for a language that is largely not interactive.
If you look at the tutorial you will notice that it too includes literate reST... which in turn includes literate Haskell. It is literate literate programming!
And the society for putting things inside of other things demands that we go one level further: an excerpt from the tutorial: I present you literate literate literate programming:
-- so-nested.rst --
You can name the stages:
-- test4.rst --
-- Named.hs --
And then go back and edit them:
-- test4.rst (cont) --
-- Named.hs (cont) --
Or insert a stage after a named stage:
-- test4.rst (cont) --
-- Named.hs (cont) --
No comments:
Post a Comment