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

Shadowing warning improvement #1060

Closed
yav opened this issue Feb 3, 2021 · 1 comment
Closed

Shadowing warning improvement #1060

yav opened this issue Feb 3, 2021 · 1 comment
Assignees
Labels
UX Issues related to the user experience (e.g., improved error messages)

Comments

@yav
Copy link
Member

yav commented Feb 3, 2021

When we check for shadowing, we should only report a warning if the shadowed name is different than the name being defined.
Usually, that would not be an issue as we have no recursive modules, but it can happen quite easily with submodules:

module A where

submodule B where
  z = 0x2

import submodule B

At the moment this results in:

[warning] at test.cry:4:3--4:4
    This binding for `z` shadows the existing binding at
    test.cry:4:3--4:4
yav added a commit that referenced this issue Feb 3, 2021
@robdockins robdockins added the UX Issues related to the user experience (e.g., improved error messages) label Feb 9, 2021
yav added a commit that referenced this issue Feb 15, 2021
yav added a commit that referenced this issue Feb 19, 2021
@yav
Copy link
Member Author

yav commented Apr 6, 2021

Should be fixed after the merge of the nested modules PR

@yav yav closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX Issues related to the user experience (e.g., improved error messages)
Projects
None yet
Development

No branches or pull requests

2 participants