Skip to content

GHC crashes when calling typeRep on a promoted tuple

The following code (asking for the typeRep of a promoted tuple) causes GHC to crash.

import Data.Typeable
import Data.Proxy

x = typeRep (Proxy::Proxy '(Int,Int))

The error message is:

[1 of 1] Compiling Main             ( ../Bug.hs, interpreted )
GHC error in desugarer lookup in Main:
  Can't find interface-file declaration for variable $tc'(,)
    Probable cause: bug in .hi-boot file, or inconsistent .hi file
    Use -ddump-if-trace to get an idea of which file caused the error
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 8.1.20160518 for x86_64-unknown-linux):
        initDs IOEnv failure
Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information