Found in 1 comment on Hacker News
gtani · 2010-03-25 · Original thread
There's quite a few examples of code generators (e.g. for GUI's, database access, write test fixtures/setup/teardown, etc) in ocaml. It is one of Harrop's success stories. The Manning Code Generation book by Harrington is from 2003, uses ruby 1.6, but i remember it being an excellent book

http://www.amazon.com/Code-Generation-Action-Jack-Herrington...

Fresh book recommendations delivered straight to your inbox every Thursday.