Allow class associated types to reference functional dependencies
Consider:
class Foo i j | i -> j where
type Bar i :: *
type Bar i = j
This is rejected as j
is not an argument to Bar
, but when we realize any instance j
will be a known type, determined by i
, as told to us by the | i -> j functional dependency on the class.
This would likely require some sort of extra pass over the instances with class associated types of this form to elaborate them, or a slight modification of the default signature implementation for class associated types.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.3 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |