
On Wed, 10 Aug 2011, Paterson, Ross wrote:
Yet another restructuring of the Prelude numeric classes on algebraic lines, proposed for a revision of the Haskell Prelude:
A nice lightweight design, both in terms of the use of type extensions and import dependencies, that should people encourage to use it, when they are afraid of changing to a more radical approach like numeric-prelude. I would have prefered the name AdditiveGroup to AbelianGroup, since with '+' and '-' and '0' I associate more than just the laws of an Abelian group. The multiplicative group of rational numbers is abelian, too. I also like the Quantity datatype. It can be used with any framework for type-encoded physical units. I have for instance a Haskell98 approach, that could be sepearated from numeric-prelude: http://hackage.haskell.org/packages/archive/numeric-prelude/0.2.2/doc/html/A... In this approach I encode composed units using type constructors like Mul and Div and the user is responsible for showing that (Mul a b) is equivalent to (Mul b a). Sure, its cumbersome, but Haskell 98 and I hope you do not need those proofs very often.