compiler exception when using empty case in Arrow notation
Summary
ghci> :set -XArrows -XLambdaCase
ghci> (proc x -> case () of) 4
*** Exception: foldb of empty list
CallStack (from HasCallStack):
error, called at compiler/GHC/HsToCore/Arrows.hs:1201:14 in ghc:GHC.HsToCore.Arrows
Expected behavior
Runtime exception (non-exhaustive patterns) rather than compiler exception
Environment
- GHC version used: 9.2.1