-
-
Notifications
You must be signed in to change notification settings - Fork 388
HLint reports incorrect redundant irrefutable pattern #2280
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
Comments
@noughtmare hi, thanks for the bug report! i could be related with the fact we are using hlint-3.2.* for hls versions tied to ghc < 9.0. |
I'm still getting "No hints" with HLint 3.2. Edit: Using HLS with GHC 9.0.1 gives the same warnings. |
many thanks for confirming it, then it could be related with the language extension, i guess the warning will appear if the language extension is not set in the file |
Reproduced with 8.10.7 without a custom configuration for extensions, the cause is the way of setting extensions for hlint is different for 8.10 and the rest of ghc versions. I think maybe the plugin is ignoring language pragmas in the module, so setting them in another scope (.cabal default-extensions, hlint external yaml config or using the |
…#2321) * Rename test data files * Add regression tests * Add regression test for #1279 * Use timeout * Correct waitForProgressDone in ghcide * Remove unnecessary waitForDiagnostics * Mark test broken for hlint on ghclib * Add test over unused extensions * Add test for #2042 * Add data for #2280 * Use waitForAllProgressDone * Add test for #2280 * correct module name * Add reproduction for #2290 * Correct test case * Comment about knownBrokenForHlint* * Correction
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 1.4.0.0 (GHC: 8.10.7) (PATH: /nix/store/mxpy0nnbirprj791gsbncmkrvi67g8x8-haskell-language-server-1.4.0.0/bin/haskell-language-server) Tool versions found on the $PATH cabal: 3.4.0.0 stack: Not found ghc: 8.10.4
Which OS do you use: NixOS 21.05
Which lsp-client do you use: Coc on Neovim (same issue in VS Codium)
Describe your project (alternative: link to the project):
Steps to reproduce
Load the file.
Expected behaviour
No HLint warnings.
Actual behaviour
A HLint warning about a redundant irrefutable pattern:
Other comment
Running
hlint
(version 3.3.4) manually does work correctly.Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: