Use injective type families (decomposition) when dealing with givens
Consider this code:
type family Id a = r | r -> a
id :: (Id a ~ Id b) => a -> b
id x = x
GHC currently rejects it because it does not use type family injectivity information when dealing with the given constraints. Implementing this requires changing Core.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.2 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | #6018 (closed) |
Blocking | |
CC | |
Operating system | |
Architecture |