panic when pretty printing lambda command with >1 arguments
Summary
Doing anything that causes a lambda (aka kappa) command with more one argument to be pretty printed (e.g. turning on -ddump-tc) will panic
ghci> :set -XArrows -XBlockArguments
ghci> import Control.Arrow
ghci> :set -ddump-tc
ghci> (proc 'a' -> (| id \'b' 'c'-> returnA -< 'c' |) 'b' 'c') 'a'
Bound Ids interactive:Ghci1.it
Typechecked expr do let it_aClghc: panic! (the 'impossible' happened)
(GHC version 9.2.1:
pprMatch
ArrowMatchCtxt KappaExpr
['b', 'c']
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/Hs/Expr.hs:1266:29 in ghc:GHC.Hs.Expr
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Expected behavior
Just pretty print the command
Environment
- GHC version used: 9.2.1