Module import code action ignores reexported-modules #2554
Labels
component: imports plugin
status: needs info
Not actionable, because there's missing information
type: bug
Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Your environment
Which OS do you use: Linux
Which LSP client (editor/plugin) do you use: NeoVim + lspconfig
Describe your project (alternative: link to the project): https://github.com/guibou/repro_hls_base_no_prelude
Steps to reproduce
You can checkout https://github.com/guibou/repro_hls_base_no_prelude, it contains two cabal project with one
Main.hs
file with the following content:Expected behaviour
The code above should not typecheck (i.e.
IO
is not in scope). Code action on the offending line should suggestion to import a few module, such asSystem.IO
orPrelude
.Actual behaviour
There is two variations in the sample codebase.
base
as a dependency. Code action works as expected and suggest to importSystem.IO
(as well as other modules frombase
which exportsIO
).base-noprelude
as a dependency.base-noprelude
is a package which reexport all modules from base butPrelude
.System.IO
is exported, see: https://github.com/haskell-hvr/base-noprelude/blob/master/base-noprelude.cabal#L232, However, code action does not suggest to importSystem.IO
:Note that in both cases, importing
System.IO
fixs the type error.The text was updated successfully, but these errors were encountered: