An unwritten kind variable is "specified", when it shouldn't be.
This fails:
{-# LANGUAGE PolyKinds, TypeApplications, ScopedTypeVariables #-}
module Bug where
import Data.Proxy
class C a where
foo :: Proxy a
bar :: forall a. C a => Proxy a
bar = foo @a
But it really should work, because the invisible kind variable to class C
should not be available for type application. On the last line, foo @_ @a
works, when you explicitly instantiate the kind variable. Also, saying :t foo
in GHCi shows the specified kind variable.
Will fix. At some point.
Trac metadata
Trac field | Value |
---|---|
Version | 8.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |