Functional dependency coverage check does not use type equalities
|Reported by:||glguy||Owned by:|
|Component:||Compiler (Type checker)||Version:||7.6.3|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Revisions:|
When checking the coverage condition to validate an instance, we should also consider equality constraints because they have a dependency in both directions.
class C a b | a -> b instance (a ~ b) => C a b -- Illegal instance declaration for ‛C a b’ -- The coverage condition fails in class ‛C’ -- for functional dependency: ‛a -> b’ -- Reason: lhs type ‛a’ does not determine rhs type ‛b’ -- Using UndecidableInstances might help -- In the instance declaration for ‛C a b’
Change History (1)
Note: See TracTickets for help on using tickets.