[Git][ghc/ghc][master] parser: Suggest ImportQualifiedPost in prepositive import warning
Marge Bot
gitlab at gitlab.haskell.org
Thu Aug 13 07:44:22 UTC 2020
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
7831fe05 by Ben Gamari at 2020-08-13T03:44:17-04:00
parser: Suggest ImportQualifiedPost in prepositive import warning
As suggested in #18545.
- - - - -
2 changed files:
- compiler/GHC/Parser/PostProcess.hs
- testsuite/tests/module/mod184.stderr
Changes:
=====================================
compiler/GHC/Parser/PostProcess.hs
=====================================
@@ -2612,6 +2612,7 @@ warnPrepositiveQualifiedModule span =
<+> text "in prepositive position"
$$ text "Suggested fix: place " <+> quotes (text "qualified")
<+> text "after the module name instead."
+ $$ text "To allow this, enable language extension 'ImportQualifiedPost'"
failOpNotEnabledImportQualifiedPost :: SrcSpan -> P ()
failOpNotEnabledImportQualifiedPost loc = addError loc msg
=====================================
testsuite/tests/module/mod184.stderr
=====================================
@@ -1,3 +1,4 @@
mod184.hs:6:8: warning: [-Wprepositive-qualified-module]
Found ‘qualified’ in prepositive position
Suggested fix: place ‘qualified’ after the module name instead.
+ To allow this, enable language extension 'ImportQualifiedPost'
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7831fe05021caa90d4696ca91ae2b31a82e65b3d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7831fe05021caa90d4696ca91ae2b31a82e65b3d
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200813/a4c6a206/attachment.html>
More information about the ghc-commits
mailing list