Re: Functional dependencies, principal types, and decidable type checking

2005-04-05 Thread Manuel M T Chakravarty
Iavor Diatchki wrote: Hi, On Apr 3, 2005 7:33 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Assume the following type class declarations with functional dependencies: {-# OPTIONS -fglasgow-exts #-} class C a b c | a b - c where foo :: (a, b) - c instance C a a r

Functional dependencies, principal types, and decidable type checking

2005-04-03 Thread Manuel M T Chakravarty
Assume the following type class declarations with functional dependencies: {-# OPTIONS -fglasgow-exts #-} class C a b c | a b - c where foo :: (a, b) - c instance C a a r = C a (b, c) r where foo (a, (b, c)) = foo (a, a) Now, in GHCi (version 6.4), *FDs let bar x = foo ((x, x), (x,

Re: Functional dependencies, principal types, and decidable type checking

2005-04-03 Thread Iavor Diatchki
Hi, On Apr 3, 2005 7:33 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Assume the following type class declarations with functional dependencies: {-# OPTIONS -fglasgow-exts #-} class C a b c | a b - c where foo :: (a, b) - c instance C a a r = C a (b, c) r where foo (a,