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 doesn't apply to let bindings #1369
Comments
This is shadowing, just as is allowed in regular let bindings. -- x is 1
x :: Int
x = let a = 0 in let a = 1 in a |
So this is supposed to be this way? Sorry then. |
There probably should be a shadowed variable warning, but yeah it's not an error. |
I guess I should have asked in IRC before creating an issue :) I think warning will be great. |
When I run:
I get:
This seems to imply the issue is in desugaring and not lets in general |
The issue is that linting happens before desugaring, and do notation isn't handled by the linter. But even if it were, |
This code does not throw "Duplicate value declaration" (or any other) error:
And if you run it you'll see:
The text was updated successfully, but these errors were encountered: