A type class will be generated for most types defined in your schema. The exception to this is an anonymous simple type, in which case the necessary code is generated "in-line" at the point of use. There are two categories of type classes, based on the two categories of XSD types: simple and complex