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

Fix -Wall and -Wunused-packages in pragmas plugin #3982

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

jhrcek
Copy link
Collaborator

@jhrcek jhrcek commented Jan 18, 2024

No description provided.

@@ -176,8 +170,8 @@ mkEdit :: (UInt,UInt) -> (UInt,UInt) -> T.Text -> TextEdit
mkEdit (startLine, startCol) (endLine, endCol) newText =
TextEdit (Range (Position startLine startCol) (Position endLine endCol)) newText

completionTest :: String -> FilePath -> T.Text -> T.Text -> Maybe InsertTextFormat -> Maybe T.Text -> Maybe T.Text -> [UInt] -> TestTree
completionTest testComment fileName replacementText expectedLabel expectedFormat expectedInsertText detail [delFromLine, delFromCol, delToLine, delToCol, completeAtLine, completeAtCol] =
completionTest :: String -> FilePath -> T.Text -> T.Text -> Maybe InsertTextFormat -> Maybe T.Text -> Maybe T.Text -> (UInt, UInt, UInt, UInt, UInt, UInt) -> TestTree
Copy link
Collaborator Author

@jhrcek jhrcek Jan 18, 2024

Choose a reason for hiding this comment

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

I find it less evil to use 6-tuple than to disable incomplete-patterns warning just to be able to pass fixed length list 😏

, completionTest "completes language extensions case insensitive" "Completion.hs" "lAnGuaGe Overloaded" "OverloadedStrings" Nothing Nothing Nothing [0, 4, 0, 34, 0, 24]
, completionTest "completes the Strict language extension" "Completion.hs" "Str" "Strict" Nothing Nothing Nothing [0, 13, 0, 31, 0, 16]
, completionTest "completes No- language extensions" "Completion.hs" "NoOverload" "NoOverloadedStrings" Nothing Nothing Nothing [0, 13, 0, 31, 0, 23]
, onlyWorkForGhcVersions (>=GHC92) "GHC2021 flag introduced since ghc9.2" $
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

2 changes here:

  • changing lists of integers to 6-tuples
  • removing conditional which is no longer needed now that ghcs < 9.2 are not supported

@jhrcek jhrcek closed this Jan 19, 2024
@jhrcek jhrcek deleted the jhrcek/unused-packages-hls-pragmas branch January 19, 2024 04:14
@jhrcek jhrcek restored the jhrcek/unused-packages-hls-pragmas branch January 19, 2024 04:15
@jhrcek
Copy link
Collaborator Author

jhrcek commented Jan 19, 2024

Sorry, mistakenly closes this PR when cleaning up branches in my fork.. reopening.

@jhrcek jhrcek reopened this Jan 19, 2024
@michaelpj michaelpj merged commit 866a533 into haskell:master Jan 19, 2024
47 of 72 checks passed
josephsumabat pushed a commit to josephsumabat/haskell-language-server that referenced this pull request Jan 22, 2024
@jhrcek jhrcek deleted the jhrcek/unused-packages-hls-pragmas branch January 23, 2024 12:30
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.

None yet

2 participants