RE: Functional dependencies, principal types, and decidable typechecking

2005-04-05 Thread Manuel M T Chakravarty
Simon Peyton-Jones wrote: > | > {-# 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) > > You are already on dodgy ground here, because the instance decl doesn't >

RE: Functional dependencies, principal types, and decidable typechecking

2005-04-05 Thread Simon Peyton-Jones
Manuel Your short program tickles a lot of different questions. Here's an explanation. Simon | Assume the following type class declarations with functional | dependencies: Actually much of the behaviour you see happens without fundeps. | > {-# OPTIONS -fglasgow-exts #-} | > | > class C a b c

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) ->