I think this has been discussed before, but I've just run into it myself.
I have a MPC 'Set', in the usual bog-standard fashion, and I want to
define interval arithmetic over sequences of such sets.  This requires
they also be partially ordered, and of a numeric type themselves, so
I end up with something like:


instance (Set s n, Num (s n), POrd (s n)) => Num [s n] where
  n + m
    = bigunion [ overlaps [n1 + m1 | m1 <- m] | n1 <- n]


This works in 3.01, but not in 3.02.  Is this restriction a sensible
one?  Come to that, are my classes?  It seems to me that the nature of
the MPC forces me to use non-variable contexts, which I think looks
a bit uglky, but I don't know of another way to get the same effect.

Slainte,
Alex.

Reply via email to