summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-03-15 09:29:24 -0400
committerBen Gamari <ben@smart-cactus.org>2017-03-15 15:23:34 -0400
commit086b514b199c122b638391f3aa2fbcf15cc10c06 (patch)
tree1227dbc5061c170fa76ddd938a7ba3ab3ddef1c1 /compiler/iface
parentcc9d574a578090d17d1597628e44371003cb19a7 (diff)
downloadhaskell-086b514b199c122b638391f3aa2fbcf15cc10c06.tar.gz
Introduce putLogMsg
This factors out the repetition of (log_action dflags dflags) and will hopefully allow us to someday better abstract log output. Test Plan: Validate Reviewers: austin, hvr, goldfire Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3334
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/BinIface.hs13
-rw-r--r--compiler/iface/LoadIface.hs2
2 files changed, 7 insertions, 8 deletions
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs
index 60f0447dd0..f658d7f156 100644
--- a/compiler/iface/BinIface.hs
+++ b/compiler/iface/BinIface.hs
@@ -76,13 +76,12 @@ readBinIface_ dflags checkHiWay traceBinIFaceReading hi_path ncu = do
let printer :: SDoc -> IO ()
printer = case traceBinIFaceReading of
TraceBinIFaceReading -> \sd ->
- log_action dflags
- dflags
- NoReason
- SevOutput
- noSrcSpan
- (defaultDumpStyle dflags)
- sd
+ putLogMsg dflags
+ NoReason
+ SevOutput
+ noSrcSpan
+ (defaultDumpStyle dflags)
+ sd
QuietBinIFaceReading -> \_ -> return ()
wantedGot :: Outputable a => String -> a -> a -> IO ()
wantedGot what wanted got =
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs
index a3f77614f9..b1a3ef1e6f 100644
--- a/compiler/iface/LoadIface.hs
+++ b/compiler/iface/LoadIface.hs
@@ -996,7 +996,7 @@ showIface hsc_env filename = do
iface <- initTcRnIf 's' hsc_env () () $
readBinIface IgnoreHiWay TraceBinIFaceReading filename
let dflags = hsc_dflags hsc_env
- log_action dflags dflags NoReason SevDump noSrcSpan
+ putLogMsg dflags NoReason SevDump noSrcSpan
(defaultDumpStyle dflags) (pprModIface iface)
-- Show a ModIface but don't display details; suitable for ModIfaces stored in