Add codegen DSL.
Move test code to Generate.hs.