
9 Mar
2008
9 Mar
'08
11:14 p.m.
Hugo Pacheco:
If the equality does not hold, you should get a type error because your program is not type correct. So, what is it that you would like different?
I would simply like the compiler not to use that instance if the equality constraint does not hold, like some another instance dependency constraint, but I assume that is not possible.
This is independent of type families. The selection of type class instances does *never* dependent on the instance context, only on the instance head. I know that this is sometimes annoying, but type checking would be a a lot more complicated/expensive without that rule. Manuel