haskell-language-server
haskell-language-server copied to clipboard
Import/export errors block import/export re-scanning
Your environment
Which OS do you use: Ubuntu 20.04 Which LSP client (editor/plugin) do you use: VS Code+Haskell+enabled autosave there Describe your project (alternative: link to the project): link
Steps to reproduce
- Clone the project's repo and switch to the second commit (link). In module
A
, moduleB
will be highlighted red. - Create
B.hs
as in the third commit (link). Though B does exportb
, in moduleA
, moduleB
will still be highlighted red.And there will be an error
Expected behaviour
When a module exports a function, the errors for modules which expected such function should be re-checked.
Actual behaviour
Instead, if there happens an error, HLS blocks further export/import checks, and there is no way to make checks start again without restarting the HLS
Include debug information
This looks like a regression. What version of HLS are you using? Did this use to work with previous versions of HLS?
Doesn't work on both 1.7.0.0
and 1.6.1.0
. Manage them with ghcup
@pepeiborra, I have a similar issue in another, slightly more complicated package A
with a module F
. I cloned a package B
with modules C
and D
there, made hie.yaml
, etc. In this package B
, module D
re-exports the contents of module C
. When I try to import a not-yet-exported function from D
into F
, I get an error like " D
doesn't export such function". Then, I add a necessary export into C
, then import and export in D
, but HLS still doesn't recognize these imports in F
until I restart it.
Here's the project.
-
F
issrc/EO/EOtoPhi.hs
-
D
iseo-parser/src/EOParser.hs
-
C
iseo-parser/src/ToTerm.hs
I've definitely observed HLS invalidating things properly when I change a cabal file. I wonder if it's a problem with stack cradles?