Skip to content

GHC panic using visible kind applications and a higher-rank kind

Using visible kind applications (#12045 (closed)):

{-# Language LiberalTypeSynonyms #-}
{-# Language PolyKinds           #-}
{-# Language RankNTypes          #-}
{-# Language DataKinds           #-}

import Data.Kind

type Cat ob = ob -> ob -> Type

data Zero :: forall (cat :: forall xx. xx -> Type) a. forall b. Cat (forall b. cat b u)
$ ghci -ignore-dot-ghci 546_bug.hs
GHCi, version 8.7.20181017: http://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( 546_bug.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_a1yl}
  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

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