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

Do not suggest bogus module names #3784

Merged
merged 4 commits into from
Sep 2, 2023
Merged

Do not suggest bogus module names #3784

merged 4 commits into from
Sep 2, 2023

Conversation

Bodigrim
Copy link
Contributor

In one of my projects HLS sometimes suggests bogus module names such as src.Foo.Bar or test.Foo.Quux. It's not quite clear what's exactly going on: it's a complex project with a custom shake-based build system and intricate environment, so I cannot distill a reproducer to share. It might very well be a deeper issue (with dysfunctional GHC session?), but what I propose here is a simple sanity check: under no circumstances we should suggest malformed module names with components starting from lower-case characters.

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

We now have a number of locations where we check whether a string could be a valid module name. We likely should unify them.

@michaelpj michaelpj merged commit 5b8c7a9 into haskell:master Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants