[Haskell-cafe] Proposal for restructuring Number classes

Andrew U. Frank frank at geoinfo.tuwien.ac.at
Mon Apr 10 06:13:55 EDT 2006


there has been discussions on and off indicating problems with the structure
of the number classes in the prelude. i have found a discussion paper by
mechveliani but i have not found a concrete proposal on the haskell' list of
tickets. i hope i can advance the process by making a concrete proposal for
which i attach Haskell code and a pdf giving the rational can be found at
ftp://ftp.geoinfo.tuwien.ac.at/frank/numbersPrelude_v1.pdf

if i have not found other contributions, i am sorry and hope to hear about
them. 

i try a conservative structure, which is more conservative than the
structure we have used here for several years (or mechveliani's proposal).
It suggests classes for units (Zeros, Ones) and CommGroup (for +, -),
OrdGroup (for abs and difference), CommRing (for *, sqr), EuclideanRing (for
gdc, lcm, quot, rem, div...) and Field (for /). I think the proposed
structure could be a foundation for mathematically strict approaches (like
mechveliani's) but still be acceptable to 'ordinary users'.

i put this proposal for discussion here and hope for suggestions how it can
be improved before i put it to haskell'!

andrew frank

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Numbers.hs
Type: application/octet-stream
Size: 3185 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/haskell-cafe/attachments/20060410/8cda9c0f/Numbers.obj


More information about the Haskell-Cafe mailing list