I think I was the one confused.

I guess I was (falsely) thinking that both

  C Int  Char T
  C Char Int  T

could both be instances of class C a b c | c -> a, c -> b but only one could be an instance of C a b c | c -> a b.

Sorry for adding noise to the discussion.

Ryan Ingram wrote:
I'm still confused about this point:

On 4/16/08, Dan Weston <[EMAIL PROTECTED]> wrote:
 class C a b c | c -> a b

 Notice that there are multiple (two) parameters in the range of the FD.

 It's tempting to convert the above to

 class C a b c | c -> a, c -> b

 but this yields a weaker (in terms of type improvement) system.

In both cases the statement is that given a type x, the instance C x y
z for some y,z and the constraint C x a b, we unambiguously have a ~
y, b ~ z (where ~ is type equality)

How does the order in (c -> a b) matter?

  -- ryan



_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to