Data.Fixed.Fixed constructor
Jules Bean
jules at jellybean.co.uk
Thu Jul 23 09:07:36 EDT 2009
Ashley Yakeley wrote:
> I'm currently working on updating the Data.Fixed module in base. I am
> adding Typeable and Data instances (automatically derived), and several
> new HasResolution types (including one for 10^-2, monetary currencies
> being an obvious Fixed use).
Is an automatic Data instance wise?
Morally speaking does a Data.Fixed really "include" a Integer?
Compare the question: should the automatic Data instance for Complex a
be used, since this exposes the fact that Complex is stored using two
components in real/imaginary components?
I think that abstract types like Complex and Fixed should be treated as
atoms by Data rather than being traversable, but I'm not sure.
Jules
More information about the Libraries
mailing list