Backpack + PolyKinds panic
While working on !4853 I could trigger the following panic:
* Add `{-# LANGUAGE PolyKinds #-}` to `./testsuite/tests/backpack/should_compile/bkp40.bkp`
* Run `ghc-8.10 --backpack bkp40.bkp`
With ghc-8.10, one gets:
```
ghc: panic! (the 'impossible' happened)
(GHC version 8.10.2:
flatten_args wandered into deeper water than usual
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1179:37 in ghc:Outputable
pprPanic, called at compiler/typecheck/TcFlatten.hs:1029:21 in ghc:TcFlatten
```
With HEAD one gets:
```
ghc: panic! (the 'impossible' happened)
(GHC version 9.1.20210119:
funResultTy
Eq (*)
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/GHC/Utils/Panic.hs:181:37 in ghc:GHC.Utils.Panic
pprPanic, called at compiler/GHC/Core/Type.hs:1183:49 in ghc:GHC.Core.Type
```
I am not blocked on this, but obviously it’s a bug.
issue