-
-
Notifications
You must be signed in to change notification settings - Fork 390
Add qualified imports in postfix position when ImportQualifiedPost
and WarnPrePositiveQualifiedModule
are set
#3399
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
Add qualified imports in postfix position when ImportQualifiedPost
and WarnPrePositiveQualifiedModule
are set
#3399
Conversation
dc27803
to
5699deb
Compare
3a65034
to
5257dc7
Compare
7bbb589
to
e1f7507
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, look great! Tell me if I am wrong, but it seems there is no test-case for the postfix position import?
@fendor thanks, I couldn't find a way to set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice contribution!
The test fails with: test\functional\FunctionalCodeAction.hs:116: expected: "Not in scope: \8216Control.when\8217\nNo module named \8216Control\8217 is imported." but got: "Variable not in scope: when :: Bool -> IO () -> IO ()" Seems like diagnostics for missing variables differ
841265d
to
526221c
Compare
With
ImportQualifiedPost
language extension and the-warnPrePositiveQualifiedModule
enabled, the default behavior of the import-export plugin to add qualified imports in prefix position produces a warning. This PR changes the position of thequalified
descriptor to postfix when the above two conditions are met. This is a partial fix for #3362.