A fragment of an attempt to make pairs serve as complex numbers, using ghc/hugs extensions:
instance Num a => Num (a,a) where (x,y) * (u,v) = (x*u-y*v, x*v+y*u) Unfortunately, type inference isn't strong enough to cope with (1,1)*(1,1) Why shouldn't it be strengthened to do so? Or is there a declarative trick (perhaps with dependent classes) that will accomplish the goal? Doug McIlroy _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell