Generic deriving: new default methods
Simon Peyton-Jones
simonpj at microsoft.com
Wed Jan 12 12:04:43 CET 2011
| I think under the hood 3 different mechanisms/concepts are now combined into
| 2 (class + instance):
| (1) class defs without defaults, giving the type of its instances
| (2) instance defs, giving values of classes
| (3) instance initializers, to be invoked for new instances of the class it is
| an initializer for, such as
| (a) filling in default values
| (b) (new) filling in generically derived values
Exactly. H98 already has a mechanism for (3), namely declare the default with the class decl. My point is that inventing a new mechanism for (3) is a completely orthogonal question to that of generic defaults, and I'd rather deal with generic defaults first, and then, independently tackle (3).
Simon
More information about the Cvs-ghc
mailing list