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

Completions broken for pre-qualified import #2824

Closed
Jashweii opened this issue Apr 11, 2022 · 3 comments
Closed

Completions broken for pre-qualified import #2824

Jashweii opened this issue Apr 11, 2022 · 3 comments
Labels
component: ghcide level: easy The issue is suited for beginners priority: high High priority item type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@Jashweii
Copy link

import qualified Control.Monad as M(|)
                                    ^ cursor

Doesn't suggest imports from Control.Monad, unlike post-qualified and unqualified imports.
I don't think it matters if "as" is present or not.

I get this on both:
HLS current master / GHC 9.2.2 / WSL Ubuntu / vscode (WSL)
HLS 1.6.1.0 / GHC 9.2.1 / Windows / vscode

@Jashweii Jashweii added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Apr 11, 2022
@xsebek
Copy link
Contributor

xsebek commented Apr 18, 2022

Hi @Jashweii, thanks for the bug report. 🙂

The issue seems to be with ghcide which provides the completion.

I wrote a test case in PR #2838, but I have not yet figured out where the problem is.

@xsebek
Copy link
Contributor

xsebek commented May 21, 2022

Mystery resolved!

-- IDE/Plugin/Completions/Logic.hs
-- getCompletions
let moduleName = T.pack $ words (T.unpack fullLine) !! 1

@michaelpj michaelpj added the level: easy The issue is suited for beginners label Jan 16, 2024
@Jashweii
Copy link
Author

Jashweii commented Feb 1, 2024

This is fixed for me as of hls-2.6.0.0 on ghc-9.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ghcide level: easy The issue is suited for beginners priority: high High priority item type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

4 participants