"Internal error" with ScopedTypeVariables and kind variables
When I try to compile the following nonsense with HEAD
{-# LANGUAGE PolyKinds, RankNTypes, ScopedTypeVariables #-}
import Data.Proxy
import GHC.Exts
withSomeSing :: forall (kproxy :: k). Proxy kproxy
withSomeSing = undefined :: (Any :: k)
I get this
GHC internal error: ‛k’ is not in scope during type checking, but it passed the renamer
tcl_env of environment: [(a4XG, Type variable ‛kproxy’ = kproxy),
(r4MW,
Identifier[withSomeSing::forall (k :: BOX) (kproxy :: k).
Proxy k kproxy, <NotTopLevel>])]
In the kind ‛k’
In an expression type signature: (Any :: k)
In the expression: undefined :: (Any :: k)
The code is very bogus, but so is GHC's response.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |