diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2017-01-30 11:53:17 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-01-30 14:00:23 -0500 |
commit | 91691117fc194c525f58ccd5b266dd1d10493e5a (patch) | |
tree | c9fd4334d5bb2441ad4c75a57697cd80462f492e /compiler/main/GHC.hs | |
parent | 7363d5380e600e2ef868a069d5df6857d9e5c17e (diff) | |
download | haskell-91691117fc194c525f58ccd5b266dd1d10493e5a.tar.gz |
Add a flag to emit error messages as JSON
This patch adds the flag `-ddump-json` which dumps all the compiler
output as a JSON array. This allows tooling to more easily parse GHC's
output to display to users.
The flag is currently experimental and will hopefully be refined for the
next release. In particular I have avoided any changes which involve
significant refactoring and provided what is easy given the current
infrastructure.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: DanielG, gracjan, thomie
Differential Revision: https://phabricator.haskell.org/D3010
GHC Trac Issues: #13190
Diffstat (limited to 'compiler/main/GHC.hs')
-rw-r--r-- | compiler/main/GHC.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs index 031bd155fa..25c1484770 100644 --- a/compiler/main/GHC.hs +++ b/compiler/main/GHC.hs @@ -459,6 +459,7 @@ withCleanupSession ghc = ghc `gfinally` cleanup cleanTempFiles dflags cleanTempDirs dflags stopIServ hsc_env -- shut down the IServ + log_finaliser dflags dflags -- exceptions will be blocked while we clean the temporary files, -- so there shouldn't be any difficulty if we receive further -- signals. |