TyVarBndr inside type quotations don't have kinds ascribed
The top-level splice
[t| Functor f => f a |] >>= \ty -> report False (show ty) >> return []
gives (I cleaned up the names)
ForallT [PlainTV f,PlainTV a] [ClassP Functor [VarT f]] (AppT (VarT f) (VarT a))
Notice the PlainTV f bit, which suggests f :: *. I can't find the documentation on PlainTV, but I suspect it isn't actually specified such that the resulting type variable is *.
This does seem like inconsistent behavior out of GHC, however: it usually provides KindedTV where it can. Since GHC catches kind errors inside [t|...|], it seems it ought to be able to generate KindedTV where possible.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.0.3 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Template Haskell |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |