@@ -29,19 +29,12 @@ spitPrecedingComments ::
2929 RealLocated a ->
3030 R ()
3131spitPrecedingComments ref = do
32− r <- getLastCommentSpan
33− case r of
34− Just (Just Pipe, _) ->
35− -- We should not insert comments between pipe Haddock and the thing
36− -- it's attached to.
37− return ()
38− _ -> do
39− gotSome <- handleCommentSeries (spitPrecedingComment ref)
40− when gotSome $ do
41− -- Insert a blank line between the preceding comments and the thing
42− -- after them if there was a blank line in the input.
43− lastSpn <- fmap snd <$> getLastCommentSpan
44− when (needsNewlineBefore (getRealSrcSpan ref) lastSpn) newline
32+ gotSome <- handleCommentSeries (spitPrecedingComment ref)
33+ when gotSome $ do
34+ -- Insert a blank line between the preceding comments and the thing
35+ -- after them if there was a blank line in the input.
36+ lastSpn <- fmap snd <$> getLastCommentSpan
37+ when (needsNewlineBefore (getRealSrcSpan ref) lastSpn) newline
4538
4639-- | Output all comments following an element at given location.
4740spitFollowingComments ::