[Haskell-cafe] Num is such a fat and greedy class
Henning Thielemann
lemming at henning-thielemann.de
Mon Dec 11 10:17:57 EST 2006
On Fri, 8 Dec 2006, Dan Weston wrote:
> 1) Groups may only want to define addition. Why can't they use +
> (instead of <+>, >++++?&**+>, or other such perversion)?
http://darcs.haskell.org/numericprelude/src/Algebra/Monoid.hs
> 2) Affine spaces have a (-) but no (+). Worse, the signature might be
> (-) :: Point -> Point -> Vector, which doesn't unify with (a -> a -> a).
yet to come
> 3) Quaternions have no signum, unit quaternions have (*), (/) but no (+)
> or (-), abs would have a different signatures (Quaternion -> Double)
> which doesn't unify with (a -> a), and fields cannot be scaled with (*)
> as in (*) :: (Field f) => Double -> f -> f
http://darcs.haskell.org/numericprelude/src/Number/Quaternion.hs
-> norm
More information about the Haskell-Cafe
mailing list