diff options
author | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-06-30 15:17:46 +0200 |
---|---|---|
committer | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-07-08 08:13:23 +0200 |
commit | 56eb57a6b348d44370fc84f6a35caabd1c548b5e (patch) | |
tree | be873cadaa3f9ec47c41546d2577d61810038313 /utils | |
parent | 5a31abe3544c21d0b45d264ea68f89bbb108251d (diff) | |
download | haskell-56eb57a6b348d44370fc84f6a35caabd1c548b5e.tar.gz |
Rename getErrorMessages and getMessages function in parser codewip/adinapoli-issue-19920
This commit renames the `getErrorMessages` and
`getMessages` function in the parser code to `getPsErrorMessages` and
`getPsMessages`, to avoid import conflicts, as we have already
`getErrorMessages` and `getMessages` defined in `GHC.Types.Error`.
Fixes #19920.
Update haddock submodule
Diffstat (limited to 'utils')
-rw-r--r-- | utils/check-exact/Main.hs | 2 | ||||
-rw-r--r-- | utils/check-exact/Parsers.hs | 8 | ||||
-rw-r--r-- | utils/check-exact/Preprocess.hs | 4 | ||||
m--------- | utils/haddock | 0 |
4 files changed, 7 insertions, 7 deletions
diff --git a/utils/check-exact/Main.hs b/utils/check-exact/Main.hs index 2034808362..0d79249398 100644 --- a/utils/check-exact/Main.hs +++ b/utils/check-exact/Main.hs @@ -30,7 +30,7 @@ import ExactPrint import Transform import Parsers -import GHC.Parser.Lexer hiding (getMessages) +import GHC.Parser.Lexer import GHC.Data.FastString import GHC.Types.SrcLoc diff --git a/utils/check-exact/Parsers.hs b/utils/check-exact/Parsers.hs index a42bba42cd..cff37bf309 100644 --- a/utils/check-exact/Parsers.hs +++ b/utils/check-exact/Parsers.hs @@ -76,7 +76,7 @@ parseWith :: GHC.DynFlags parseWith dflags fileName parser s = case runParser parser dflags fileName s of GHC.PFailed pst - -> Left (GHC.GhcPsMessage <$> GHC.getErrorMessages pst) + -> Left (GHC.GhcPsMessage <$> GHC.getPsErrorMessages pst) GHC.POk _ pmod -> Right pmod @@ -90,7 +90,7 @@ parseWithECP :: (GHC.DisambECP w) parseWithECP dflags fileName parser s = case runParser (parser >>= \p -> GHC.runPV $ GHC.unECP p) dflags fileName s of GHC.PFailed pst - -> Left (GHC.GhcPsMessage <$> GHC.getErrorMessages pst) + -> Left (GHC.GhcPsMessage <$> GHC.getPsErrorMessages pst) GHC.POk _ pmod -> Right pmod @@ -185,7 +185,7 @@ parseModuleFromStringInternal dflags fileName str = let (str1, lp) = stripLinePragmas str res = case runParser GHC.parseModule dflags fileName str1 of GHC.PFailed pst - -> Left (GHC.GhcPsMessage <$> GHC.getErrorMessages pst) + -> Left (GHC.GhcPsMessage <$> GHC.getPsErrorMessages pst) GHC.POk _ pmod -> Right (lp, dflags, pmod) in postParseTransform res @@ -258,7 +258,7 @@ parseModuleEpAnnsWithCppInternal cppOptions dflags file = do return $ case parseFile dflags' file fileContents of GHC.PFailed pst - -> Left (GHC.GhcPsMessage <$> GHC.getErrorMessages pst) + -> Left (GHC.GhcPsMessage <$> GHC.getPsErrorMessages pst) GHC.POk _ pmod -> Right $ (injectedComments, dflags', fixModuleTrailingComments pmod) diff --git a/utils/check-exact/Preprocess.hs b/utils/check-exact/Preprocess.hs index 9d7e883aad..f95668141c 100644 --- a/utils/check-exact/Preprocess.hs +++ b/utils/check-exact/Preprocess.hs @@ -24,7 +24,7 @@ import qualified GHC.Driver.Errors.Types as GHC import qualified GHC.Driver.Phases as GHC import qualified GHC.Driver.Pipeline as GHC import qualified GHC.Fingerprint.Type as GHC -import qualified GHC.Parser.Lexer as GHC hiding (getMessages) +import qualified GHC.Parser.Lexer as GHC import qualified GHC.Settings as GHC import qualified GHC.Types.Error as GHC (getMessages) import qualified GHC.Types.SourceError as GHC @@ -283,7 +283,7 @@ parseError pst = do let -- (warns,errs) = GHC.getMessages pst dflags -- throw $ GHC.mkSrcErr (GHC.unitBag $ GHC.mkPlainErrMsg dflags sspan err) - GHC.throwErrors $ (GHC.GhcPsMessage <$> GHC.getErrorMessages pst) + GHC.throwErrors $ (GHC.GhcPsMessage <$> GHC.getPsErrorMessages pst) -- --------------------------------------------------------------------- diff --git a/utils/haddock b/utils/haddock -Subproject f7059f84687a6aac37405c428a97190662de1da +Subproject 32d280f30d73bb38769700be6ddaf26b9a69c77 |