Proposal for stand-alone deriving declarations?
Twan van Laarhoven
twanvl at gmail.com
Sat Oct 7 10:44:17 EDT 2006
> The main use for this seems to be when a module defining a data type
> lacks an instance you want, and for some reason you can't get the
> original module changed.
If you continue this line of reasoning:
1. The only reason a module can not be changed is that it is in some
library as opposed to your own code.
2. The only instances that can be derived are for Prelude classes.
3. These classes are already known in library modules, so they could
have been derived there.
4. The fact that they are not unnecessarily reduces the usefulness of
the library, and could therefore be considered a bug.
5. In fact, looking at the standard libraries, they already provide
instances for all relevant Prelude classes.
This leaves me to wonder what stand-alone deriving is actually good for,
only newtypes?
Twan
More information about the Haskell-prime
mailing list