summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2017-01-30 11:53:17 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-30 14:00:23 -0500
commit91691117fc194c525f58ccd5b266dd1d10493e5a (patch)
treec9fd4334d5bb2441ad4c75a57697cd80462f492e /docs
parent7363d5380e600e2ef868a069d5df6857d9e5c17e (diff)
downloadhaskell-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 'docs')
-rw-r--r--docs/users_guide/8.2.1-notes.rst4
-rw-r--r--docs/users_guide/debugging.rst6
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/users_guide/8.2.1-notes.rst b/docs/users_guide/8.2.1-notes.rst
index e654f20399..ae156cb110 100644
--- a/docs/users_guide/8.2.1-notes.rst
+++ b/docs/users_guide/8.2.1-notes.rst
@@ -125,6 +125,10 @@ Compiler
:ghc-flag:`-Wmissing-methods` will now warn that ``_Bar`` is not implemented
in the ``Foo Int`` instance.
+- A new flag :ghc-flag:`-ddump-json` has been added. This flag dumps compiler
+ output as JSON documents. It is experimental and will be refined depending
+ on feedback from tooling authors for the next release.
+
GHCi
~~~~
diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst
index 9994ef9d6a..8191048b92 100644
--- a/docs/users_guide/debugging.rst
+++ b/docs/users_guide/debugging.rst
@@ -170,6 +170,12 @@ Dumping out compiler intermediate structures
dump foreign export stubs
+ .. ghc-flag:: -ddump-json
+
+ Dump error messages as JSON documents. This is intended to be consumed
+ by external tooling. A good way to use it is in conjunction with
+ :ghc-flag:`-ddump-to-file`.
+
.. ghc-flag:: -ddump-simpl-iterations
Show the output of each *iteration* of the simplifier (each run of