Opened 2 years ago

Closed 2 years ago

#7502 closed bug (fixed)

Panic when using lists of type-literals

Reported by: diatchki 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/T7502
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

The following program:

{-# LANGUAGE DataKinds #-}

type S = [1,2]

Causes a panic:

ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.7.20121129 for x86_64-unknown-linux):
	lookupVers2
<<details unavailable>>

Change History (2)

comment:1 Changed 2 years ago by simonpj@…

commit aad93f5c9eb9d53cddf85019192ba0da6004d17e

Author: Simon Peyton Jones <[email protected]>
Date:   Wed Dec 19 17:35:51 2012 +0000

    Move the kind Nat and Symbol out of TysPrim and into TysWiredIn
    
    They properly belong in TysWiredIn, since they are defined in Haskell
    in GHC.TypeLits.
    
    Moveover, make them WiredIn (again as they should be) and use
    checkWiredInTyCon when encountering them in TcHsType.tc_hs_type,
    so that the interface file is loaded.  This fixes Trac #7502.

 compiler/prelude/PrelNames.lhs       |    8 +-------
 compiler/prelude/TysPrim.lhs         |    7 -------
 compiler/prelude/TysWiredIn.lhs      |   29 +++++++++++++++++++++++++++++
 compiler/prelude/TysWiredIn.lhs-boot |    1 +
 compiler/typecheck/TcHsType.lhs      |   15 +++++++++------
 compiler/types/Kind.lhs              |    1 -
 compiler/types/Type.lhs              |    2 +-
 7 files changed, 41 insertions(+), 22 deletions(-)

comment:2 Changed 2 years ago by simonpj

  • difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to polykinds/T7502
Note: See TracTickets for help on using tickets.