[Haskell-cafe] Num is such a fat and greedy class
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)?
> 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
More information about the Haskell-Cafe