{-# Language RankNTypes, DerivingStrategies, TypeApplications, ScopedTypeVariables, GADTs, PolyKinds #-}moduleT14154wherenewtypeRangha=MkRan(forallb.(a->gb)->hb)newtypeSwappfgawhereMkSwap::pgfa->Swappfgaireturn::forallmia.a->miiaireturn=undefinedxs=caseireturn@(SwapRan)'a'ofMkSwap(MkRanf)->fprint
$ ghci -ignore-dot-ghci /tmp/bug.hsGHCi, version 8.3.20170605: http://www.haskell.org/ghc/ :? for help[1 of 1] Compiling Main ( /tmp/bug.hs, interpreted )ghc: panic! (the 'impossible' happened) (GHC version 8.3.20170605 for x86_64-unknown-linux): piResultTy k0_a1Ki[tau:2] b0_a1Kt[tau:2] Call stack: CallStack (from HasCallStack): prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable pprPanic, called at compiler/types/Type.hs:949:35 in ghc:TypePlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug>