diff options
Diffstat (limited to 'utils/check-exact/Parsers.hs')
-rw-r--r-- | utils/check-exact/Parsers.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/check-exact/Parsers.hs b/utils/check-exact/Parsers.hs index eccf3f2612..f1437869ee 100644 --- a/utils/check-exact/Parsers.hs +++ b/utils/check-exact/Parsers.hs @@ -87,7 +87,7 @@ parseWith :: GHC.DynFlags -> ParseResult w parseWith dflags fileName parser s = case runParser parser dflags fileName s of - GHC.PFailed pst -> Left (fmap GHC.pprError $ GHC.getErrorMessages pst) + GHC.PFailed pst -> Left (fmap GHC.mkParserErr $ GHC.getErrorMessages pst) GHC.POk _ pmod -> Right pmod @@ -101,7 +101,7 @@ parseWithECP dflags fileName parser s = -- case runParser ff dflags fileName s of -- case runParser (parser >>= \p -> GHC.runECP_P p) dflags fileName s of case runParser (parser >>= \p -> GHC.runPV $ GHC.unECP p) dflags fileName s of - GHC.PFailed pst -> Left (fmap GHC.pprError $ GHC.getErrorMessages pst) + GHC.PFailed pst -> Left (fmap GHC.mkParserErr $ GHC.getErrorMessages pst) GHC.POk _ pmod -> Right pmod -- --------------------------------------------------------------------- @@ -192,7 +192,7 @@ parseModuleFromStringInternal :: Parser GHC.ParsedSource parseModuleFromStringInternal dflags fileName str = let (str1, lp) = stripLinePragmas str res = case runParser GHC.parseModule dflags fileName str1 of - GHC.PFailed pst -> Left (fmap GHC.pprError $ GHC.getErrorMessages pst) + GHC.PFailed pst -> Left (fmap GHC.mkParserErr $ GHC.getErrorMessages pst) GHC.POk _ pmod -> Right (lp, dflags, pmod) in postParseTransform res @@ -263,7 +263,7 @@ parseModuleEpAnnsWithCppInternal cppOptions dflags file = do return (contents1,lp,dflags) return $ case parseFile dflags' file fileContents of - GHC.PFailed pst -> Left (fmap GHC.pprError $ GHC.getErrorMessages pst) + GHC.PFailed pst -> Left (fmap GHC.mkParserErr $ GHC.getErrorMessages pst) GHC.POk _ pmod -> Right $ (injectedComments, dflags', pmod) |