
22 Jan
2006
22 Jan
'06
10:45 p.m.
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 http://haskell.org/hawiki/DimensionalizedNumbers 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 -><-