diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2019-02-28 12:42:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-28 12:42:49 -0500 |
commit | df4a5bce84505772bb8d611472c57c0c6310107f (patch) | |
tree | d7d451534df193f9d9221583042ce8d3abfdede7 /haddock-api | |
parent | 59843f9e3d222901421a92fff793a1e031f38f65 (diff) |
`--show-interface` should output to stdout. (#1040)
Fixes #864.
Diffstat (limited to 'haddock-api')
-rw-r--r-- | haddock-api/src/Haddock.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 |