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
Import statements with module instantiation should not trigger an error message #2579
Comments
Ok, I commented out the line in the parser that raised the error. |
Please document this change. |
Previously I could write import M args in order to bring instances into scope. Now I have to write something like import M args as Dummy Can someone please motivate this change? |
The situation would be slightly better if I could write import M args as _ However, this doesn't work (#3457). |
OK, I think that's a step in the right direction. I do think that the following code is too ugly:
However, the reason that I have modules with nothing but instances is that instances became available for instance resolution so easily before. I wonder if I would have used a different design if the new rules had been in place when I wrote my code. (I don't feel like redesigning it now.) |
Wait, now I'm confused. Doesn't 'in scope' for instance arguments also include things that are only in scope under their qualified name? So then
(#1913 is about |
Oh, I misunderstood. This issue is only about modules that are applied to arguments at the place where they're imported. I anyway never parametrize the top-level module in a file so I don't care much about how this works. |
An import statement of the form
import M args
triggers the following error message:However, if
M
contains instances, then this kind of import statement actually makes sense.The text was updated successfully, but these errors were encountered: