Core Lint error with a data type
The following data declaration fails -dcore-lint
{-# LANGUAGE PolyKinds, ExplicitForAll, ExistentialQuantification #-}
module T16221 where
data T0 a = forall k (b :: k). MkT0 (T0 b) !Int
The test case was extracted from T14066a, the bang is to force the data type to have a wrapper. This has been present at least since GHC 8.0.
<no location info>: warning:
In the type ‘T0 a_a1wY’
Kind application error in type ‘T0 a_a1wY’
Function kind = forall k. k -> *
Arg kinds = [(k_X1x2, *), (a_a1wY, k_a1wZ)]
Fun: k_X1x2
(a_a1wY, k_a1wZ)
<no location info>: warning:
In the expression: MkT0
@ k_X1x2 @ a_a1wY @ k_X1x2 @ b_a1x0 dt_a1xC dt_X1xK
Kinds don't match in type application:
Type variable: a_X1xw :: k_X1x2
Arg type: a_a1wY :: k_a1wZ
Linted Arg kind: k_a1wZ
<no location info>: warning:
In the type ‘T0 a_a1wY’
Kind application error in type ‘T0 a_a1wY’
Function kind = forall k. k -> *
Arg kinds = [(k_X1x2, *), (a_a1wY, k_a1wZ)]
Fun: k_X1x2
(a_a1wY, k_a1wZ)
<no location info>: warning:
In the expression: MkT0
@ k_X1x2 @ a_a1wY @ k_X1x2 @ b_a1x0 dt_a1xC dt_X1xK
Kinds don't match in type application:
Type variable: a_X1xw :: k_X1x2
Arg type: a_a1wY :: k_a1wZ
Linted Arg kind: k_a1wZ
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |