[GHC] #16221: Core Lint error with a data type
GHC
ghc-devs at haskell.org
Wed Jan 23 17:47:13 UTC 2019
#16221: Core Lint error with a data type
-------------------------------------+-------------------------------------
Reporter: monoidal | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.7
(Type checker) |
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Compile-time
Unknown/Multiple | crash or panic
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
The following data declaration fails `-dcore-lint`
{{{
#!haskell
{-# 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
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16221>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list