summaryrefslogtreecommitdiff
path: root/utils/check-ppr
diff options
context:
space:
mode:
Diffstat (limited to 'utils/check-ppr')
-rw-r--r--utils/check-ppr/Main.hs7
-rw-r--r--utils/check-ppr/check-ppr.cabal2
2 files changed, 6 insertions, 3 deletions
diff --git a/utils/check-ppr/Main.hs b/utils/check-ppr/Main.hs
index 2fd44b2be0..a5aeee2f1d 100644
--- a/utils/check-ppr/Main.hs
+++ b/utils/check-ppr/Main.hs
@@ -31,7 +31,8 @@ testOneFile :: FilePath -> String -> IO ()
testOneFile libdir fileName = do
p <- parseOneFile libdir fileName
let
- origAst = showAstData BlankSrcSpan (pm_parsed_source p)
+ origAst = showSDoc unsafeGlobalDynFlags
+ $ showAstData BlankSrcSpan (pm_parsed_source p)
pped = pragmas ++ "\n" ++ pp (pm_parsed_source p)
anns = pm_annotations p
pragmas = getPragmas anns
@@ -45,7 +46,9 @@ testOneFile libdir fileName = do
p' <- parseOneFile libdir newFile
- let newAstStr = showAstData BlankSrcSpan (pm_parsed_source p')
+ let newAstStr :: String
+ newAstStr = showSDoc unsafeGlobalDynFlags
+ $ showAstData BlankSrcSpan (pm_parsed_source p')
writeFile newAstFile newAstStr
if origAst == newAstStr
diff --git a/utils/check-ppr/check-ppr.cabal b/utils/check-ppr/check-ppr.cabal
index 584558b3ff..2da21d766b 100644
--- a/utils/check-ppr/check-ppr.cabal
+++ b/utils/check-ppr/check-ppr.cabal
@@ -25,7 +25,7 @@ Executable check-ppr
Build-Depends: base >= 4 && < 5,
bytestring,
containers,
- Cabal >= 2.0 && < 2.1,
+ Cabal >= 2.4 && < 2.5,
directory,
filepath,
ghc