If you like programmable documents, I have two suggestions to look into:
- org-mode :: This emacs mode lets you create documents of just about any format, style, and purpose. Think of it as markdown's older brother that takes HGH and compete to be the best of everything, and almost is. But he farts and burps a lot.[0]
- Scribble :: A racket (plt scheme) documentation tool that uses racket's #lang directives to create a fairly neat documentation tool, but pretty scheme specific.
Scribble isn't type-checked (though maybe it plays with Typed Racket?), but is similarly about creating documents that leverages the underlying programming language.