Skip to content

Fix -Wall and -Wunused-packages in hls-class-plugin#3972

Merged
michaelpj merged 3 commits into
haskell:masterfrom
jhrcek:jhrcek/unused-packages-class
Jan 17, 2024
Merged

Fix -Wall and -Wunused-packages in hls-class-plugin#3972
michaelpj merged 3 commits into
haskell:masterfrom
jhrcek:jhrcek/unused-packages-class

Conversation

@jhrcek

@jhrcek jhrcek commented Jan 17, 2024

Copy link
Copy Markdown
Collaborator

No description provided.

allDecls <- hsDecls ps
let (before, ((L l inst): after)) = break (inRange range . getLoc) allDecls
replaceDecls ps (before ++ (L l (addWhere inst)): (map newLine inserting ++ after))
case break (inRange range . getLoc) allDecls of

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and next hunk fix incomplete-uni-patterns warnings.

(locA l) -- bindSpan
(locA l') -- bindNameSpan
in toBindInfo <$> filter (\(L _ name) -> unLoc name `notElem` sigNames) bindNames
getBindSpanWithoutSig _ = []

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing overlapping pattern match.

@michaelpj
michaelpj merged commit 78dacc5 into haskell:master Jan 17, 2024
@jhrcek
jhrcek deleted the jhrcek/unused-packages-class branch January 19, 2024 04:14
josephsumabat pushed a commit to josephsumabat/haskell-language-server that referenced this pull request Jan 22, 2024
* Fix -Wunused-packages in class plugin

* -Wall and hlint fixes

* Fix type annotation for ghc 9.6+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants