Skip to content

Adding {-# OPTIONS_GHC -Wno-all #-} at the top of the file makes HLS cease to report errors, not only warnings. #4349

Open
@kindaro

Description

@kindaro

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:

{-# 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

https://gist.github.com/kindaro/23d8232be484cdd8b650617709d7f355

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: ghcidestatus: blockedNot actionable, because blocked by upstream/GHC etc.type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions