#15597 closed bug (duplicate)

GHC shouting: panic!

Reported by: tstr Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.4.1
Keywords: TypeInType Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash or panic Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


This program makes the impossible happen:

{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeInType #-}

import GHC.Types

data Bug :: (f x -> Type) -> Type where
  Bug :: forall
   (r::h -> forall x. f x -> Type)
   (a::f x)
   .  (r::((f x -> Type) -> Type) -> forall x. f x -> Type) Bug a
   -> Bug (r::f x -> Type)

And asked for reporting the error:

ghc: panic! (the 'impossible' happened)
  (GHC version 8.4.1 for x86_64-unknown-linux):
  (x_aozeN[sk:2] |> {co_aozeO})
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable
        pprPanic, called at compiler/types/Type.hs:950:35 in ghc:Type

Change History (1)

comment:1 Changed 13 months ago by simonpj

Resolution: duplicate
Status: newclosed

Thanks for reporting. Happily, there are many other tickets about piResultTy, all fixed so far as I know. And indeed, this one is fine in HEAD and with GHC 8.6. So I'll close this as a dup.

Note: See TracTickets for help on using tickets.