compiles. minor hacks in CodeGen.hs