Closed jstolarek closed 9 years ago
Closing as invalid. Richard explains:
The problem is how GHC interprets the type G 'KProxy -> G 'KProxy
. After kind-checking & desugaring, this becomes, with explicit kind arguments: G k1 ('KProxy k1) -> G k2 ('KProxy k2)
. This type clearly does not classify the identity function. The problem is that the solver is run "too late" here. By the time the injectivity annotations are processed, the type has already been desugared, with an extra degree of freedom. (...) try this:
foo :: G ('KProxy :: KProxy k) -> G ('KProxy :: KProxy k)
That should eliminate the unwanted degree of freedom.
This definition fails the ambiguity check but I believe it shouldn't.