Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove empty haddocks and remove empty comments. #1459

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Include multi-line postfix haddock comments
  • Loading branch information
philderbeast committed Aug 4, 2024
commit 7e670a6106770910a899faf6e2c7db0071bb1425
2 changes: 1 addition & 1 deletion src/GHC/Util/ApiAnnotation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ isCommentPragma _ = False

isCommentHaddock :: LEpaComment -> Bool
isCommentHaddock (L _ (EpaComment (EpaBlockComment comm) _)) =
"{- |" `isPrefixOf` comm && "-}" `isSuffixOf` comm
("{- |" `isPrefixOf` comm || "{- ^" `isPrefixOf` comm) && "-}" `isSuffixOf` comm
isCommentHaddock (L _ (EpaComment (EpaLineComment comm) _)) =
"-- |" `isPrefixOf` comm || "-- ^" `isPrefixOf` comm
isCommentHaddock _ = False
Expand Down