Numeric class lattice reworking?
wnoise at ofb.net
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
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?
More information about the Haskell-prime