Skip to content

Type representations missing for promoted boxed tuples

This is a continuation of #11120 (closed). It seems there is something odd happening with type representations for boxed tuples,

$ inplace/bin/ghc-stage2 --interactive
GHCi, version 8.1.20160528: http://www.haskell.org/ghc/  :? for help
Prelude> :set -XDataKinds
Prelude> :m + Data.Typeable Data.Proxy
Prelude Data.Typeable Data.Proxy> typeOf (Proxy :: Proxy (Int,Int))
Proxy * (Int,Int)
Prelude Data.Typeable Data.Proxy> typeOf (Proxy :: Proxy '(Int,Int))
GHC error in desugarer lookup in Ghci2:
  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.20160528 for x86_64-unknown-linux):
        initDs IOEnv failure

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Prelude Data.Typeable Data.Proxy> 

This is odd since the $tc'(,) binding is present in the interface file for GHC.Tuple,

$ inplace/bin/ghc-stage2 --show-iface libraries/ghc-prim/dist-install/build/GHC/Tuple.dyn_hi |less
...
14e44400752f4580e52ed2a760b9633f
  $tc'(,) :: TyCon
  {- HasNoCafRefs, Strictness: m,
     Unfolding: (TyCon
                   14407099369839560749##
                   10712746223293009168##
                   $trModule
                   $tc'(,)1) -}
543be63d698612591d2e75b0b60ad643
  $tc'(,)1 :: TrName
  {- HasNoCafRefs, Strictness: m1, Unfolding: (TrNameS "'(,)"#) -}
...
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information