On Tue, Jan 27, 2009 at 4:51 AM,  <o...@okmij.org> wrote:
> Doug McIlroy wrote:
>> 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)
> The recent versions of GHC have a nifty equality constraint, so the
> code can be written simply

I'm confused on why
instance Num a => Num (a, a) where

is not equivalent to
instance (Num a, Num b, a ~ b) => Num (a, b) where

I don't know the details of the type inference algorithm. What am I
missing to understand why they are not the same?

Cheers,
Corey O'Connor
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to