From df4a5bce84505772bb8d611472c57c0c6310107f Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Thu, 28 Feb 2019 12:42:49 -0500 Subject: `--show-interface` should output to stdout. (#1040) Fixes #864. --- haddock-api/src/Haddock.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/haddock-api/src/Haddock.hs b/haddock-api/src/Haddock.hs index 43f600b4..4ebdbfb4 100644 --- a/haddock-api/src/Haddock.hs +++ b/haddock-api/src/Haddock.hs @@ -76,6 +76,7 @@ import Packages import Panic (handleGhcException) import Module import FastString +import Outputable (defaultUserStyle) -------------------------------------------------------------------------------- -- * Exception handling @@ -171,7 +172,7 @@ haddockWithGhc ghc args = handleTopExceptions $ do forM_ (optShowInterfaceFile flags) $ \path -> liftIO $ do mIfaceFile <- readInterfaceFiles freshNameCache [(("", Nothing), path)] forM_ mIfaceFile $ \(_, ifaceFile) -> do - putMsg dflags (renderJson (jsonInterfaceFile ifaceFile)) + logOutput dflags (defaultUserStyle dflags) (renderJson (jsonInterfaceFile ifaceFile)) if not (null files) then do (packages, ifaces, homeLinks) <- readPackagesAndProcessModules flags files -- cgit v1.2.3