Numeric class lattice reworking?

Aaron Denney wnoise at
Sun Jan 22 22:45:20 EST 2006

One of the complaints I've seen with people trying to do various
mathematical tasks in haskell is the inflexibility of the numeric
prelude.  The biggest issue is having (*) and (+) in the same
typeclass, but other generalizations are certainly possible.
MPTC would allow such things as modules with (*) having type a -> b -> b
which covers everything from group actions to scalar multiplication
of vectors.

Actually, a -> b -> c would be nice.  See 
this would let me have multiplication of numbers with units, enforced at
the type level, while keeping the safety of (+) :: a -> a -> a.

Is there any chance of this sort of breakup happening?

Aaron Denney

More information about the Haskell-prime mailing list