Hi Oleg and others,

[EMAIL PROTECTED] wrote:
> Jean-Marie Gaillourdet wrote:
>>> class T root pos sel | pos -> root, root -> sel where
>>>    f :: pos -> sel -> Bool
>>> instance T root (Any root) sel
>> If that is correct, I don't understand why this instance should be to
>> general, as every instantiation of "root" exactly determines the
>> corresponding instantiation of "Any root".
> 
> The class T has two functional dependencies: pos -> root and
> root->sel. I believe you are talking about the former whereas my
> previous message was talking about the latter.

But the same applies to the second functional dependency and the type
variable sel. Every instantiation of root determines the instantiation
of sel. And that forbids instance T Int (Any Int) Bool and instance T
Int (Any Int) Int inside the same scope, doesn't it?

At least, that is what I would like to express by those two fundeps.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to