diff options
Diffstat (limited to 'utils/check-exact/Parsers.hs')
-rw-r--r-- | utils/check-exact/Parsers.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/check-exact/Parsers.hs b/utils/check-exact/Parsers.hs index b592a4cee4..e631d43314 100644 --- a/utils/check-exact/Parsers.hs +++ b/utils/check-exact/Parsers.hs @@ -119,7 +119,7 @@ withDynFlags libdir action = ghcWrapper libdir $ do -- --------------------------------------------------------------------- -parseFile :: GHC.DynFlags -> FilePath -> String -> GHC.ParseResult (GHC.Located GHC.HsModule) +parseFile :: GHC.DynFlags -> FilePath -> String -> GHC.ParseResult (GHC.Located (GHC.HsModule GHC.GhcPs)) parseFile = runParser GHC.parseModule -- --------------------------------------------------------------------- @@ -275,10 +275,10 @@ postParseTransform parseRes = fmap mkAnns parseRes fixModuleTrailingComments :: GHC.ParsedSource -> GHC.ParsedSource fixModuleTrailingComments (GHC.L l p) = GHC.L l p' where - an' = case GHC.hsmodAnn p of + an' = case GHC.hsmodAnn $ GHC.hsmodExt p of (GHC.EpAnn a an ocs) -> GHC.EpAnn a an (rebalance (GHC.am_decls an) ocs) unused -> unused - p' = p { GHC.hsmodAnn = an' } + p' = p { GHC.hsmodExt = (GHC.hsmodExt p){ GHC.hsmodAnn = an' } } -- p' = error $ "fixModuleTrailingComments: an'=" ++ showAst an' rebalance :: GHC.AnnList -> GHC.EpAnnComments -> GHC.EpAnnComments |