
14 Jul
2009
14 Jul
'09
1:22 a.m.
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). The Fixed type is simply a newtype of Integer. Should I expose its MkFixed constructor? Against: * MkFixed is not used in numerical calculation, and isn't itself a conversion function from Integer (obviously). * Ratio doesn't expose its constructor. For: * It's possible to recreate it anyway. * There's a Data instance, so morally the constructor is exposed. -- Ashley Yakeley