WIP: Backport fix for !3497 (Avoid exponential inlining)
I made an attempt to backport cf9a6c17 to GHC-8.10.
Currently this still fails with
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 8.10.2.20201101:
funArgTy
forall a b.
(a_a2vG, b_a2vH, a -> b)
-> (a_a2vG, b_a2vH, a) -> (a_a2vG, b_a2vH, b)
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1179:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:1043:41 in ghc:Type
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug