From f8386c7b6a9d26bc5fd2c1d74d944c8df6337690 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Tue, 17 Mar 2020 15:32:32 +0100 Subject: Refactor PprDebug handling If `-dppr-debug` is set, then PprUser and PprDump styles are silently replaced with PprDebug style. This was done in `mkUserStyle` and `mkDumpStyle` smart constructors. As a consequence they needed a DynFlags parameter. Now we keep the original PprUser and PprDump styles until they are used to create an `SDocContext`. I.e. the substitution is only performed in `initSDocContext`. --- compiler/GHC/Core/Opt/Simplify.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/GHC/Core/Opt/Simplify.hs') diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs index 483bd5f38c..340efd2c9c 100644 --- a/compiler/GHC/Core/Opt/Simplify.hs +++ b/compiler/GHC/Core/Opt/Simplify.hs @@ -1804,7 +1804,7 @@ completeCall env var cont log_inlining doc = liftIO $ dumpAction dflags - (mkUserStyle dflags alwaysQualify AllTheWay) + (mkUserStyle alwaysQualify AllTheWay) (dumpOptionsFromFlag Opt_D_dump_inlinings) "" FormatText doc @@ -2092,7 +2092,7 @@ tryRules env rules fn args call_cont log_rule dflags flag hdr details = liftIO $ do - let sty = mkDumpStyle dflags alwaysQualify + let sty = mkDumpStyle alwaysQualify dumpAction dflags sty (dumpOptionsFromFlag flag) "" FormatText $ sep [text hdr, nest 4 details] -- cgit v1.2.1