RE: Type classes and code generation