Respect newlines before "where"

ghc92
Lennart Spitzner 2023-05-03 20:25:19 +00:00
parent 2b77142617
commit 687b59c62f
1 changed files with 4 additions and 1 deletions

View File

@ -238,7 +238,10 @@ layoutGrhs (L _ (GRHS epAnn guards body)) = do
guardDocs <- case guards of
[] -> pure []
_ -> docFlushCommsPost False posArrow $ callLayouter layout_stmt `mapM` guards
bodyDoc <- callLayouter layout_expr body
let bodyEndPos = case locA $ getLoc body of
GHC.RealSrcSpan s _ -> Just s
GHC.UnhelpfulSpan{} -> Nothing
bodyDoc <- docFlushCommsPost True bodyEndPos $ callLayouter layout_expr body
return (Just epAnn, guardDocs, bodyDoc)
layoutPatternBind