Class method types may depend on earlier methods

Classes are now represented as dependent records, rather than simple
records. This allows type classes to capture functions and their
properties together.