Skip to content

GHC HEAD-only panic with PartialTypeSignatures

The following program typechecks on GHC 8.8.1:

{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Bug where

import Data.Proxy

f :: forall a (x :: a). Proxy (x :: _)
f = Proxy

However, it panics on GHC HEAD:

$ ~/Software/ghc5/inplace/bin/ghc-stage2 Bug.hs
[1 of 1] Compiling Bug              ( Bug.hs, Bug.o )

Bug.hs:8:37: warning: [-Wpartial-type-signatures]ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 8.9.0.20190522:
        No skolem info:
  [a_avg[sk:1]]
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1173:37 in ghc:Outputable
        pprPanic, called at compiler/typecheck/TcErrors.hs:2927:5 in ghc:TcErrors

This regression was introduced in commit 80dfcee6. cc'ing @simonpj, the author of that patch.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information