summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent/should_fail
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/dependent/should_fail
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/dependent/should_fail')
-rw-r--r--testsuite/tests/dependent/should_fail/PromotedClass.stderr5
-rw-r--r--testsuite/tests/dependent/should_fail/RAE_T32a.stderr2
-rw-r--r--testsuite/tests/dependent/should_fail/T11334b.stderr18
3 files changed, 12 insertions, 13 deletions
diff --git a/testsuite/tests/dependent/should_fail/PromotedClass.stderr b/testsuite/tests/dependent/should_fail/PromotedClass.stderr
index 544124ed07..f0683309bc 100644
--- a/testsuite/tests/dependent/should_fail/PromotedClass.stderr
+++ b/testsuite/tests/dependent/should_fail/PromotedClass.stderr
@@ -1,6 +1,5 @@
PromotedClass.hs:10:15: error:
• Illegal constraint in a type: Show a0
- • In the first argument of ‘Proxy’, namely ‘MkX True’
- In the type signature:
- foo :: Proxy (MkX True)
+ • In the first argument of ‘Proxy’, namely ‘( 'MkX 'True)’
+ In the type signature: foo :: Proxy ( 'MkX 'True)
diff --git a/testsuite/tests/dependent/should_fail/RAE_T32a.stderr b/testsuite/tests/dependent/should_fail/RAE_T32a.stderr
index 1a54c7d53b..cb94dd2854 100644
--- a/testsuite/tests/dependent/should_fail/RAE_T32a.stderr
+++ b/testsuite/tests/dependent/should_fail/RAE_T32a.stderr
@@ -15,5 +15,5 @@ RAE_T32a.hs:28:20: error:
RAE_T32a.hs:28:27: error:
Expected kind ‘Sigma’, but ‘Sigma p r’ has kind ‘*’
- In the second argument of ‘Sing’, namely ‘Sigma p r’
+ In the second argument of ‘Sing’, namely ‘(Sigma p r)’
In the data instance declaration for ‘Sing’
diff --git a/testsuite/tests/dependent/should_fail/T11334b.stderr b/testsuite/tests/dependent/should_fail/T11334b.stderr
index 8f4251b0cd..effdf20828 100644
--- a/testsuite/tests/dependent/should_fail/T11334b.stderr
+++ b/testsuite/tests/dependent/should_fail/T11334b.stderr
@@ -3,22 +3,22 @@ T11334b.hs:8:14: error:
• Cannot default kind variable ‘f0’
of kind: k0 -> *
Perhaps enable PolyKinds or add a kind signature
- • In an expression type signature: Proxy Compose
- In the expression: Proxy :: Proxy Compose
- In an equation for ‘p’: p = Proxy :: Proxy Compose
+ • In an expression type signature: Proxy 'Compose
+ In the expression: Proxy :: Proxy 'Compose
+ In an equation for ‘p’: p = Proxy :: Proxy 'Compose
T11334b.hs:8:14: error:
• Cannot default kind variable ‘g0’
of kind: k10 -> k0
Perhaps enable PolyKinds or add a kind signature
- • In an expression type signature: Proxy Compose
- In the expression: Proxy :: Proxy Compose
- In an equation for ‘p’: p = Proxy :: Proxy Compose
+ • In an expression type signature: Proxy 'Compose
+ In the expression: Proxy :: Proxy 'Compose
+ In an equation for ‘p’: p = Proxy :: Proxy 'Compose
T11334b.hs:8:14: error:
• Cannot default kind variable ‘a0’
of kind: k10
Perhaps enable PolyKinds or add a kind signature
- • In an expression type signature: Proxy Compose
- In the expression: Proxy :: Proxy Compose
- In an equation for ‘p’: p = Proxy :: Proxy Compose
+ • In an expression type signature: Proxy 'Compose
+ In the expression: Proxy :: Proxy 'Compose
+ In an equation for ‘p’: p = Proxy :: Proxy 'Compose