[Fwd: Numeric Class reworking]
ross at soi.city.ac.uk
Wed Jul 26 18:57:43 EDT 2006
On Mon, 17 Jul 2006 10:58:48 +1200, Vivian McPhail wrote:
> Haskell is often cited as an elegant and 'mathematical' language in which to
> program. This post is to voice my support for a modified Numeric Prelude
> that would be consistent with  and/or . It would be an improvement if
> the numeric classes were more structured along the lines of algebraic
> properties (similar to the monad laws) of various entities.
> I remember griping about this when I first learned Haskell.
> While the typical user may not need to know about the underlying
> mathematical structure of the objects that they are working with, it would
> be good if the system were consistent for those that do.
>  http://haskell.org/docon/
>  http://cvs.haskell.org/darcs/numericprelude/
The numeric prelude package (though the documentation is hard to follow
with all the classes called C and types called T) seems to consist of
- a bunch of unary classes refactoring the Haskell 98 numeric class
- multi-parameter classes, building on the former classes, for vector
spaces and related concepts.
A refactoring like the former would be useful on its own, and would
provide a base for adding the other classes later.
Of course the algebraic properties won't be satisfied by floating
More information about the Haskell-prime