
#15549: Core Lint error with EmptyCase
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.8.1
Component: Compiler (Type | Version: 8.4.3
checker) | Keywords: TypeFamilies,
Resolution: | TypeInType
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: #14729 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
Another program, identified in
https://ghc.haskell.org/trac/ghc/ticket/15725#comment:7, which may suffer
from the same problems as described in this ticket:
{{{#!hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeInType #-}
module Bug where
import Data.Kind (Type)
newtype Identity a = Identity a
newtype Par1 a = Par1 a
data family Sing :: forall k. k -> Type
data instance Sing :: forall k. k -> Type
type family Rep1 (f :: Type -> Type) :: Type -> Type
type instance Rep1 Identity = Par1
type family From1 (z :: f a) :: Rep1 f a
type instance From1 ('Identity x) = 'Par1 x
und :: a
und = und
f :: forall (a :: Type) (x :: Identity a). Sing x
f = g
where g :: forall (a :: Type) (f :: Type -> Type) (x :: f a). Sing x
g = seq (und :: Sing (From1 x)) und
}}}
{{{
*** Core Lint errors : in result of Simplifier ***
Bug.hs:25:1: warning:
[in body of lambda with binder x_a19R :: Identity a_a19Q]
Kind application error in
coercion ‘(Sing
(D:R:Rep1Identity[0]