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

Better "module defined multiple times" error #1024

Closed
hdgarrood opened this issue Apr 3, 2015 · 3 comments
Closed

Better "module defined multiple times" error #1024

hdgarrood opened this issue Apr 3, 2015 · 3 comments

Comments

@hdgarrood
Copy link
Contributor

from IRC - for the "module X has been defined multiple times" error, it would be nice to show every filename that defines a module X. Currently, if you get that error, you have to use grep or something and find it yourself, which is not catastrophic but also not the nicest user experience.

@mjgpy3
Copy link
Contributor

mjgpy3 commented Apr 26, 2015

I notice there's also a RedefinedIdent error type as well. Is showing files for that error also a desirable enhancement? If so, should it be done as part of this issue or a separate one?

@hdgarrood
Copy link
Contributor Author

RedefinedIdent is only thrown during type checking, whereas RedefinedModule is thrown during desugaring. Type errors do seem to have good information about where they arose from, so I don't think RedefinedIdent suffers from the same issue that this issue is about. Having said that, I was unable to work out how to write a program that actually failed with that type error. Either way I don't think it's the same issue.

@hdgarrood
Copy link
Contributor Author

Do you think it would make sense to store a module's filename inside the AST? That is, adding an extra argument to the Module constructor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants