fixed up merge of CodeGen.hs