Skip to content

Panic when using StaticPointers with typed holes

Adding a type hole when there is a type variable in StaticPtr throws a GHC panic:

{-# LANGUAGE StaticPointers #-}

module Foo where

import Data.Typeable
import GHC.StaticPtr

foo :: Typeable a => StaticPtr a
foo = static _ 
[1 of 1] Compiling Foo              ( test.hs, test.o )

test.hs:9:14: error:ghc: panic! (the 'impossible' happened)
  (GHC version 8.4.1 for x86_64-unknown-linux):
	No skolem info:
  [a_aD2[sk:2]]
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable
        pprPanic, called at compiler/typecheck/TcErrors.hs:2945:5 in ghc:TcErrors

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

This panics on both GHC 8.2.2 and 8.4.1.

Trac metadata
Trac field Value
Version 8.4.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