Skip to content

Two code actions for import module name; one of them is broken #630

Closed
haskell/ghcide
#952
@Ailrun

Description

@Ailrun

Your environment

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

haskell-language-server version: 0.6.0.0 (GHC: 8.10.2) (PATH: /home/jjc93/.local/bin/haskell-language-server-wrapper) (GIT hash: d79feb5bf5d9a33003125e2988d7c0dc7174b8d5)
Tool versions found on the $PATH
cabal:          3.2.0.0
stack:          2.5.1
ghc:            8.10.2

Which lsp-client do you use:
Emacs with LSP-mode
Describe your project (alternative: link to the project):
It is a project created by cabal init.
Contents of hie.yaml: Nothing (implicit yaml)

Steps to reproduce

  1. create a project using cabal init.
  2. go to Main.hs file, and type import Data.E.
  3. try all code actions for Data.Eq.

Expected behaviour

There is only one code action for Data.Eq, and it replaces import Data.E with import Data.Eq.

Actual behaviour

LSP-mode shows there are two actions. HLS log also conforms to that. One of the actions substitutes Data.Eq for import Data.E.

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