summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2018-05-13 11:39:34 -0400
committerBen Gamari <ben@smart-cactus.org>2018-05-13 18:30:43 -0400
commit6ab7cf995dafcc9196e87bbde76b4f6937507592 (patch)
tree499b36d722e3caa22b07fcc73f2138fd37f8b033 /testsuite/tests
parent00049e2dce93b1e468c3fde3287371eb988aafdc (diff)
downloadhaskell-6ab7cf995dafcc9196e87bbde76b4f6937507592.tar.gz
Simplify -ddump-json implementation
This patch takes the much simpler route of whenever the compiler tries to output something. We just dump a JSON document there and then. I think this should be sufficient to work with and anything more refined quickly got complicated as it was necessary to demarcate message scopes and so on. Reviewers: bgamari, dfeuer Reviewed By: bgamari Subscribers: Phyx, dfeuer, rwbarton, thomie, carter GHC Trac Issues: #14078 Differential Revision: https://phabricator.haskell.org/D4532
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/driver/json.stderr9
-rw-r--r--testsuite/tests/driver/json2.stderr10
2 files changed, 2 insertions, 17 deletions
diff --git a/testsuite/tests/driver/json.stderr b/testsuite/tests/driver/json.stderr
index ff3915a654..61a55e09d0 100644
--- a/testsuite/tests/driver/json.stderr
+++ b/testsuite/tests/driver/json.stderr
@@ -1,8 +1 @@
-
-json.hs:6:7: error:
- • No instance for (Num (a -> a)) arising from the literal ‘5’
- (maybe you haven't applied a function to enough arguments?)
- • In the expression: 5
- In an equation for ‘id1’: id1 = 5
-[
- {"span": {"file": "json.hs","startLine": 6,"startCol": 7,"endLine": 6,"endCol": 8},"doc": "\u2022 No instance for (Num (a -> a)) arising from the literal \u20185\u2019\n (maybe you haven't applied a function to enough arguments?)\n\u2022 In the expression: 5\n In an equation for \u2018id1\u2019: id1 = 5","severity": "SevError","reason": null}]
+{"span": {"file": "json.hs","startLine": 6,"startCol": 7,"endLine": 6,"endCol": 8},"doc": "\u2022 No instance for (Num (a -> a)) arising from the literal \u20185\u2019\n (maybe you haven't applied a function to enough arguments?)\n\u2022 In the expression: 5\n In an equation for \u2018id1\u2019: id1 = 5","severity": "SevError","reason": null}
diff --git a/testsuite/tests/driver/json2.stderr b/testsuite/tests/driver/json2.stderr
index 1f0940bd4a..9fab34417d 100644
--- a/testsuite/tests/driver/json2.stderr
+++ b/testsuite/tests/driver/json2.stderr
@@ -1,9 +1 @@
-TYPE SIGNATURES
- foo :: forall a. a -> a
-TYPE CONSTRUCTORS
-COERCION AXIOMS
-Dependent modules: []
-Dependent packages: [base-4.12.0.0, ghc-prim-0.5.2.1,
- integer-gmp-1.0.2.0]
-[
- {"span": null,"doc": "TYPE SIGNATURES\n foo :: forall a. a -> a\nTYPE CONSTRUCTORS\nCOERCION AXIOMS\nDependent modules: []\nDependent packages: [base-4.12.0.0, ghc-prim-0.5.2.1,\n integer-gmp-1.0.2.0]","severity": "SevOutput","reason": null}]
+{"span": null,"doc": "TYPE SIGNATURES/n foo :: forall a. a -> a/nTYPE CONSTRUCTORS/nCOERCION AXIOMS/nDependent modules: []/nDependent packages: [base-4.12.0.0, ghc-prim-0.5.2.1,/n integer-<IMPL>-<VERSION>]","severity": "SevOutput","reason": null}