diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/check-ppr/Main.hs | 7 |
1 files changed, 5 insertions, 2 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 |