Data.Fixed.Fixed constructor

Ashley Yakeley ashley at
Fri Jul 24 02:13:26 EDT 2009

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

More information about the Libraries mailing list