Hello again, Please pardon another question on functional dependencies. GHC and Hugs behave differently on the following code:
class Tr tr a b | tr -> a b where f :: tr -> a -> b class (Tr m a b, Tr n b c) => TrPair m n a c The type variable b on the second line does not appear in the head, but is determined by m and n in the head via the functional dependency declared for Tr. Hugs accepts this code, while GHC doesn't. The original fundeps paper (Mark Jones, ESOP 2000) seems silent on this point. Taking a step back, is there a formal description of type inference for functional dependencies in Haskell type classes? A set of typing rules, or something written along the lines of John Peterson and Mark Jones's "Implementing type classes" (PLDI 1993) or Mark Jones's "Typing Haskell in Haskell", would be wonderful to have. Ken -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig Tax the rich! new journal Physical Biology: http://physbio.iop.org/ What if All Chemists Went on Strike? (science fiction): http://www.iupac.org/publications/ci/2003/2506/iw3_letters.html
signature.asc
Description: Digital signature
_______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell