Skip to content
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

Adding types to import list includes identically named constructors. #1932

Closed
Fybe opened this issue Jun 16, 2021 · 0 comments · Fixed by #1984
Closed

Adding types to import list includes identically named constructors. #1932

Fybe opened this issue Jun 16, 2021 · 0 comments · Fixed by #1984

Comments

@Fybe
Copy link

Fybe commented Jun 16, 2021

Steps to reproduce

module A where

data Foo = Foo
module B where

foo :: Foo
foo = undefined

Pressing Ctrl+. on Foo in Module B and adding the missing import
adds import A (Foo(Foo)) to the import list.

Expected behaviour

Only the type name gets imported, not the constructor.

Actual behaviour

The constructor gets imported as well, even though it is not required.

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.2.0.0 (GHC: 8.10.4) (PATH: /home/finn/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-1.2.0-linux-8.10.4) (GIT hash: be2071e985cb417f984ab00a1aad76dee02d6d0b)
Tool versions found on the $PATH
cabal:		3.0.0.0
stack:		2.5.1
ghc:		8.8.4

Which OS do you use:
Fedora 34

Which lsp-client do you use:
VS Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants