[Git][ghc/ghc][wip/T18545] parser: Suggest ImportQualifiedPost in prepositive import warning

Ben Gamari gitlab at gitlab.haskell.org
Mon Aug 10 17:31:09 UTC 2020



Ben Gamari pushed to branch wip/T18545 at Glasgow Haskell Compiler / GHC


Commits:
7632c73a by Ben Gamari at 2020-08-10T13:31:03-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
=====================================
@@ -2610,6 +2610,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/7632c73a86cffae9090cb7f778148746b8d09aca

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7632c73a86cffae9090cb7f778148746b8d09aca
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/20200810/97a080a4/attachment.html>


More information about the ghc-commits mailing list