Skip to content

GHC panic: data T :: (a :: k) -> *

This might be the root cause of some of my previous

{-# Language PolyKinds #-}

data T :: (a :: k) -> *
$ ghci -ignore-dot-ghci 580.hs
GHCi, version 8.7.20181017: http://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( 580.hs, interpreted )
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 8.7.20181017 for x86_64-unknown-linux):
        ASSERT failed!
  Type-correct unfilled coercion hole {co_a1xI}
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable
        pprPanic, called at compiler/utils/Outputable.hs:1219:5 in ghc:Outputable
        assertPprPanic, called at compiler/typecheck/TcHsSyn.hs:1805:99 in ghc:TcHsSyn

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

>

on 8.6.1 this gives

$ ~/.stack/programs/x86_64-linux/ghc-8.6.1/bin/ghci -ignore-dot-ghci 580.hs
GHCi, version 8.6.1: http://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( /home/baldur/hs/580.hs, interpreted )

/home/baldur/hs/580.hs:3:11: error:
    • Expected a type, but ‘(a :: k)’ has kind ‘k’
    • In the kind ‘(a :: k) -> *’
  |
3 | data T :: (a :: k) -> *
  |           ^^^^^^^^
Failed, no modules loaded.
Prelude>
Edited by Icelandjack
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information