Allow case-of Blockargument operand with par-spacing

ghc92
Lennart Spitzner 2023-06-21 15:03:20 +02:00
parent 9d14407191
commit 9737cb3adc
2 changed files with 6 additions and 0 deletions

View File

@ -1108,3 +1108,8 @@ func = do
some long function invocation (plus a paren + ed operator expression)
`shouldReturn` all ((==) True)
:: IO ()
#test allow operator plus paragraph case-of BlockArgument
func arg = abc ++ def ++ case arg of
False -> ghi
True -> jkl

View File

@ -22,6 +22,7 @@ allowAsOpPar :: LHsExpr GhcPs -> Bool
allowAsOpPar = \case
L _ HsLam{} -> True
L _ HsLamCase{} -> True
L _ HsCase{} -> True
L _ HsDo{} -> True
_ -> False