
#15796: Core Lint error with visible kind application -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: | TypeApplications Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #12045 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Yes it is Simon this uses [https://phabricator.haskell.org/D5229 D5229 (Visible kind application)]. Here is another program that triggers a similar error {{{#!hs {-# Language DataKinds #-} {-# Language TypeOperators #-} {-# Language PolyKinds #-} {-# Language GADTs #-} {-# Language TypeFamilies #-} {-# Options_GHC -dcore-lint #-} import qualified GHC.TypeLits as TypeLits import Data.Kind data OP a = Op a type family UnOp (op_a :: OP a) :: a where UnOp (Op a) = a class Ríki (obj :: Type) where type (-->) :: OP obj -> obj -> Type data (<=) :: OP TypeLits.Nat -> TypeLits.Nat -> Type where LessThan :: TypeLits.KnownNat (UnOp op_a) => op_a <= b instance Ríki TypeLits.Nat where type (-->) = (<=) }}} {{{ $ ghci -ignore-dot-ghci 572_bug.hs GHCi, version 8.7.20181017: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( 572_bug.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.7.20181017 for x86_64-unknown-linux): Core Lint error <no location info>: warning: In the type ‘(<=)’ Found TcTyCon: <=[tc] Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable pprPanic, called at compiler/typecheck/FamInst.hs:171:31 in ghc:FamInst Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15796#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler