@@ -128,7 +128,10 @@ p_match style isInfix m_pats m_grhss = do
128128 Function name -> Just $ getLoc name
129129 _ -> Nothing
130130 Just pats -> Just . getLoc $ NE.last pats
131−
131+ isCase = \case
132+ Case -> True
133+ LambdaCase -> True
134+ _ -> False
132135 inci' $ do
133136 let GRHSs {..} = m_grhss
134137 hasGuards = withGuards grhssGRHSs
@@ -136,7 +139,7 @@ p_match style isInfix m_pats m_grhss = do
136139 case style of
137140 Function _ -> txt " ="
138141 PatternBind -> txt " ="
139− Case -> unless hasGuards (txt " ->")
142+ s | isCase s && hasGuards -> return ()
140143 _ -> txt " ->"
141144 let grhssSpan = combineSrcSpans' $
142145 getGRHSSpan . unLoc <$> NE.fromList grhssGRHSs
@@ -147,12 +150,9 @@ p_match style isInfix m_pats m_grhss = do
147150 Hanging -> inci
148151 p_body = do
149152 let groupStyle =
150− case style of
151− Case ->
152− if hasGuards
153− then RightArrow
154− else EqualSign
155− _ -> EqualSign
153+ if isCase style && hasGuards
154+ then RightArrow
155+ else EqualSign
156156 newlineSep (located' (p_grhs groupStyle)) grhssGRHSs
157157 unless
158158 (GHC.isEmptyLocalBindsPR (unLoc grhssLocalBinds))