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 unnecessary CommentExtraction instances #958

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Changes from all commits
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
3 changes: 0 additions & 3 deletions src/HIndent/Pretty/NodeComments.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
instance CommentExtraction l => CommentExtraction (GenLocated l e) where
nodeComments (L l _) = nodeComments l

instance CommentExtraction (HsDataDefn GhcPs) where
nodeComments HsDataDefn {} = emptyNodeComments

instance CommentExtraction (MatchGroup GhcPs a) where
nodeComments MG {} = emptyNodeComments

Expand Down Expand Up @@ -184,7 +181,7 @@
nodeComments DctMulti {} = emptyNodeComments

instance CommentExtraction OverlapMode where
nodeComments NoOverlap {} = emptyNodeComments

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 184 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive
nodeComments Overlappable {} = emptyNodeComments
nodeComments Overlapping {} = emptyNodeComments
nodeComments Overlaps {} = emptyNodeComments
Expand Down Expand Up @@ -235,7 +232,7 @@
nodeComments FamEqn' {..} = nodeComments famEqn

instance CommentExtraction (IEWrappedName a) where
nodeComments IEName {} = emptyNodeComments

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.2.8)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.2.8)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.2.8)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 235 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive
nodeComments IEPattern {} = emptyNodeComments
nodeComments IEType {} = emptyNodeComments

Expand Down Expand Up @@ -318,7 +315,7 @@
nodeComments FL {} = emptyNodeComments

instance CommentExtraction (HsLit GhcPs) where
nodeComments HsChar {} = emptyNodeComments

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.4.8)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive

Check warning on line 318 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, nightly)

Pattern match(es) are non-exhaustive
nodeComments HsCharPrim {} = emptyNodeComments
nodeComments HsString {} = emptyNodeComments
nodeComments HsStringPrim {} = emptyNodeComments
Expand Down Expand Up @@ -494,7 +491,7 @@
nodeComments = nodeCommentsHsExpr

nodeCommentsHsExpr :: HsExpr GhcPs -> NodeComments
nodeCommentsHsExpr HsVar {} = emptyNodeComments

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 494 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.8.1)

Pattern match(es) are non-exhaustive
nodeCommentsHsExpr HsLam {} = emptyNodeComments
nodeCommentsHsExpr HsAppType {} = emptyNodeComments
nodeCommentsHsExpr (ExplicitSum x _ _ _) = nodeComments x
Expand Down Expand Up @@ -658,7 +655,7 @@
#else
nodeCommentsMatchContext :: HsMatchContext GhcPs -> NodeComments
#endif
nodeCommentsMatchContext FunRhs {} = emptyNodeComments

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 658 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.8.1)

Pattern match(es) are non-exhaustive
nodeCommentsMatchContext CaseAlt {} = emptyNodeComments
nodeCommentsMatchContext IfAlt {} = emptyNodeComments
nodeCommentsMatchContext ArrowMatchCtxt {} = emptyNodeComments
Expand All @@ -679,7 +676,7 @@
nodeComments = nodeCommentsPat

nodeCommentsPat :: Pat GhcPs -> NodeComments
nodeCommentsPat WildPat {} = emptyNodeComments

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (ubuntu-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.8.1)

Pattern match(es) are non-exhaustive

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (windows-latest, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.10.1)

Pattern match(es) are non-exhaustive

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.6.4)

Pattern match(es) are non-exhaustive

Check warning on line 679 in src/HIndent/Pretty/NodeComments.hs

View workflow job for this annotation

GitHub Actions / CI (macos-13, 9.8.1)

Pattern match(es) are non-exhaustive
nodeCommentsPat VarPat {} = emptyNodeComments
nodeCommentsPat (ListPat x _) = nodeComments x
nodeCommentsPat (SumPat x _ _ _) = nodeComments x
Expand Down
Loading