Revamping the numeric classes

Dylan Thurston
Tue, 6 Feb 2001 15:23:30 -0500

On Tue, Feb 06, 2001 at 03:25:11PM +0100, Koen Claessen wrote:
> What do people think about this? If people prefer these
> stylistic changes, I think we should not hesitate making
> them for Haskell/2 by completely redesigning the module
> structure and using more consistent naming conventions.

These sound great to me.  If Haskell/2 is indeed open to such changes,
would also be possible to revamp the numeric modules?  As a
mathematician, I get annoyed by such things as

* (+) and (-) being lumped in with (*) (doesn't anyone use vector spaces?)

* the function 'atan2' being mixed in with a bunch of operations very
  specific to the floating point format in the 'RealFloat' class.
  Same problem (though less serious) with 'quot', etc., and
  'toInteger' in the Integral class.

* Superfluous superclasses: why are Show and Eq superclasses of Num?
  Not all numeric types have decidable equality.  Think arbitrary
  precision reals.

(I saw Mechvelliani's Basic Algebra Proposal; it strikes me as being
too complicated for the task.)

	Dylan Thurston