Skip to content

Crash with data type return kinds

This module

{-# LANGUAGE StandaloneKindSignatures, TypeFamilies, GADTs, DataKinds #-}

module TyCl where

import Data.Kind

type family Star where Star = Type

type W :: Star
type W = T

newtype T where
  MkT :: Int -> W

crashes HEAD:

ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 8.11.0.20200615:
	getRuntimeRep
  (Int |> Sym (D:R:Star[0])) :: Star
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Outputable.hs:1221:37 in ghc:GHC.Utils.Outputable
        pprPanic, called at compiler/GHC/Core/Type.hs:2072:18 in ghc:GHC.Core.Type
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information