@@ -80,10 +80,10 @@ p_match style Match {..} = do
80 inci' (velt' (located' p_pat <$> m_pats))
80 inci' (velt' (located' p_pat <$> m_pats))
81 return inci'
81 return inci'
82 inci' $ do
82 inci' $ do
84 let GRHSs {..} = m_grhss
83 let GRHSs {..} = m_grhss
85− unless (length grhssGRHSs > 1) . txt $
84+ unless (length grhssGRHSs > 1) $ do
86− case style of
86+ txt $ case style of
87 Function _ -> "="
87 Function _ -> "="
89 let combinedSpans = combineSrcSpans' $
89 let combinedSpans = combineSrcSpans' $
@@ -101,9 +101,6 @@ p_match style Match {..} = do
101 line (txt "where")
101 line (txt "where")
102 inci (located grhssLocalBinds p_hsLocalBinds)
102 inci (located grhssLocalBinds p_hsLocalBinds)
104−getGRHSSpan :: GRHS GhcPs (LHsExpr GhcPs) -> SrcSpan
105−getGRHSSpan (GRHS _ body) = getSpan body
107p_grhs :: GRHS GhcPs (LHsExpr GhcPs) -> R ()
104p_grhs :: GRHS GhcPs (LHsExpr GhcPs) -> R ()
108p_grhs (GRHS guards body) =
105p_grhs (GRHS guards body) =
109 case guards of
106 case guards of
@@ -111,9 +108,9 @@ p_grhs (GRHS guards body) =
113 velt $ withSep comma (located' p_stmt) xs
110 velt $ withSep comma (located' p_stmt) xs
114− txt " ->"
111+ txt " ="
115 breakpoint
112 breakpoint
116− p_body
113+ inci p_body
118 p_body = located body p_hsExpr
115 p_body = located body p_hsExpr
@@ -237,3 +234,9 @@ p_hsExpr = \case
237 EViewPat {} -> notImplemented "EViewPat"
234 EViewPat {} -> notImplemented "EViewPat"
238 ELazyPat {} -> notImplemented "ELazyPat"
235 ELazyPat {} -> notImplemented "ELazyPat"
239 HsWrap {} -> notImplemented "HsWrap"
236 HsWrap {} -> notImplemented "HsWrap"
238+----------------------------------------------------------------------------
241+getGRHSSpan :: GRHS GhcPs (LHsExpr GhcPs) -> SrcSpan
242+getGRHSSpan (GRHS _ body) = getSpan body