#8616 closed bug (fixed)

"Internal error" with ScopedTypeVariables and kind variables

Reported by: goldfire Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: polykinds/T8616
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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.

Change History (3)

comment:1 Changed 20 months ago by Simon Peyton Jones <simonpj@…>

In 17a3dacba03f7a800444c135e93ce1b81a89e158/ghc:

Bring kind variables into the type-checker's scope as well as type variables

Fixes Trac #8616

comment:2 Changed 20 months ago by Simon Peyton Jones <simonpj@…>

comment:3 Changed 20 months ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to polykinds/T8616

Fixed, thank you.

Simon

Note: See TracTickets for help on using tickets.