
31 May
2009
31 May
'09
3:24 a.m.
Hi, Consider this (a bit pathological) Haskell code: -------------------------------------- class A a where foo :: A (b d) => a (c b) -------------------------------------- GHC compiles it successfully, but Hugs rejects it: Ambiguous type signature in class declaration *** ambiguous type : (A a, A (b c)) => a (d b) *** assigned to : foo What is the correct behavior, and which part of the haskell 98 report explains this? Thanks, Vladimir