haskell / haskell/haskell-language-server
Adding `{-# OPTIONS_GHC -Wno-all #-}` at the top of the file makes HLS cease to report errors, not only warnings.
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 13
Description
### Your environment
Which OS do you use? ArchLinux.
Which version of GHC do you use and how did you install it? 9.4.8, via `ghcup`.
How is your project built (alternative: link to the project)? With Cabal.
Which LSP client (editor/plugin) do you use? `emacs` and `lsp-mode`.
Which version of HLS do you use and how did you install it? 2.5.0.0, 2.7.0.0, 2.9.0.1, via `ghcup`.
Have you configured HLS in any way (especially: a `hie.yaml` file)? No. `gen-hie > hie.yaml` has no effect.
### Steps to reproduce
Create a file like so:
```ghc
{-# OPTIONS_GHC -Wno-all #-}
module Example where
f :: Int
f = g
```
Run `haskell-language-server-wrapper Example.hs`.
### Expected behaviour
`g` is not in scope; GHC could not compile this file. HLS should show this error to me in the editor and when running from the command line.
### Actual behaviour
HLS does not report the error.
### Debug information
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the Example.hs contents and run haskell-language-server-wrapper Example.hs, then inspect the debug information in the linked gist. Trace why the `-Wno-all` option suppresses the out-of-scope error, and verify that HLS reports `g` as not in scope both in the editor and on the command line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100