
24 Jul
2009
24 Jul
'09
2:13 a.m.
On Fri, 2009-07-24 at 02:03 -0400, David Menendez wrote:
If the constructor is already exposed, then you don't lose abstraction with a derived instance.
Out of curiosity, what made you decide to expose the constructor?
As a general rule, if there is a correct Data instance, then it is always possible to recreate the constructors. Since I am providing a Data instance, I might as well provide the MkFixed constructor. Consider: your Data instance is StringRep-based. My automatically derived one is Integer-based. Both suggest concrete representations, but the Integer one makes much more sense to me. And as it happens, that's the actual concrete representation. -- Ashley Yakeley