summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api/annotations/T10313.stdout
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2016-11-08 21:37:48 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2016-12-07 21:31:13 +0200
commit499e43824bda967546ebf95ee33ec1f84a114a7c (patch)
tree58b313d734cfba014395ea5876db48e8400296a8 /testsuite/tests/ghc-api/annotations/T10313.stdout
parent83d69dca896c7df1f2a36268d5b45c9283985ebf (diff)
downloadhaskell-499e43824bda967546ebf95ee33ec1f84a114a7c.tar.gz
Add HsSyn prettyprinter tests
Summary: Add prettyprinter tests, which take a file, parse it, pretty print it, re-parse the pretty printed version and then compare the original and new ASTs (ignoring locations) Updates haddock submodule to match the AST changes. There are three issues outstanding 1. Extra parens around a context are not reproduced. This will require an AST change and will be done in a separate patch. 2. Currently if an `HsTickPragma` is found, this is not pretty-printed, to prevent noise in the output. I am not sure what the desired behaviour in this case is, so have left it as before. Test Ppr047 is marked as expected fail for this. 3. Apart from in a context, the ParsedSource AST keeps all the parens from the original source. Something is happening in the renamer to remove the parens around visible type application, causing T12530 to fail, as the dumped splice decl is after the renamer. This needs to be fixed by keeping the parens, but I do not know where they are being removed. I have amended the test to pass, by removing the parens in the expected output. Test Plan: ./validate Reviewers: goldfire, mpickering, simonpj, bgamari, austin Reviewed By: simonpj, bgamari Subscribers: simonpj, goldfire, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2752 GHC Trac Issues: #3384
Diffstat (limited to 'testsuite/tests/ghc-api/annotations/T10313.stdout')
-rw-r--r--testsuite/tests/ghc-api/annotations/T10313.stdout32
1 files changed, 11 insertions, 21 deletions
diff --git a/testsuite/tests/ghc-api/annotations/T10313.stdout b/testsuite/tests/ghc-api/annotations/T10313.stdout
index a2680a9582..d1cc35cb61 100644
--- a/testsuite/tests/ghc-api/annotations/T10313.stdout
+++ b/testsuite/tests/ghc-api/annotations/T10313.stdout
@@ -1,27 +1,17 @@
-[([i], [([", b, \, x, 6, 1, s, e, "], base)]),
+[([i], [(SourceText "b\x61se", base)]),
([w],
- [([", N, e, w, , Z, 3, , A, P, I, , s, u, p, p, o, r, t, , i,
- s, , s, t, i, l, l, , i, n, c, o, m, p, l, e, t, e, , a, n, d,
- , f, r, a, g, i, l, e, :, , \,
-, , , , , , , , , , ,
- \, y, o, u, , m, a, y, , e, x, p, e, r, i, e, n, c, e, , s, e,
- g, m, e, n, t, a, t, i, o, n, , f, a, u, l, t, s, !, "],
+ [(SourceText "New Z3 API support is still incomplete and fragile: \
+ \you may experience segmentation faults!",
New Z3 API support is still incomplete and fragile: you may experience segmentation faults!)]),
([d],
- [([", D, e, p, r, e, c, a, t, i, o, n, :, , \,
-, , , , , ,
- , , , , , \, y, o, u, , m, a, y, , e, x, p, e, r, i, e, n,
- c, e, , s, e, g, m, e, n, t, a, t, i, o, n, , f, a, u, l, t, s,
- !, "],
+ [(SourceText "Deprecation: \
+ \you may experience segmentation faults!",
Deprecation: you may experience segmentation faults!)]),
- ([c],
- [([", f, o, o, \, x, 6, 3, "], fooc),
- ([", b, \, x, 6, 1, r, "], bar)]),
- ([r], [([", f, o, o, 1, \, x, 6, 7, "], foo1g)]),
- ([s, t], [([", a, \, x, 6, 2, "], ab)]),
+ ([c], [(SourceText "foo\x63", fooc), (SourceText "b\x61r", bar)]),
+ ([r], [(SourceText "foo1\x67", foo1g)]),
+ ([s, t], [(SourceText "a\x62", ab)]),
([c, o],
- [([", S, t, r, i, c, t, , B, i, t, s, t, r, e, a, m, , s, t, r,
- e, \, x, 6, 1, m, "],
+ [(SourceText "Strict Bitstream stre\x61m",
Strict Bitstream stream)]),
- ([s, c], [([", f, o, o, \, x, 6, 4, "], food)]),
- ([t, p], [([", f, o, o, b, \, x, 6, 1, r, "], foobar)])]
+ ([s, c], [(SourceText "foo\x64", food)]),
+ ([t, p], [(SourceText "foob\x61r", foobar)])]