summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs/should_compile/all.T
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-05-16 12:11:37 -0400
committerBen Gamari <ben@smart-cactus.org>2018-05-16 12:58:29 -0400
commit99f8cc84a5b23878b3b0732955cb651bc973e9f2 (patch)
tree4dc7d2d1061f99a2a29a6e6b8f4492dbd8e54c23 /testsuite/tests/partial-sigs/should_compile/all.T
parent126b4125d95f7e4d272a9307cb8b634b11bd337f (diff)
downloadhaskell-99f8cc84a5b23878b3b0732955cb651bc973e9f2.tar.gz
Fix #15039 by pretty-printing equalities more systematically
GHC previously had a handful of special cases for pretty-printing equalities in a more user-friendly manner, but they were far from comprehensive (see #15039 for an example of where this fell apart). This patch makes the pretty-printing of equalities much more systematic. I've adopted the approach laid out in https://ghc.haskell.org/trac/ghc/ticket/15039#comment:4, and updated `Note [Equality predicates in IfaceType]` accordingly. We are now more careful to respect the properties of the `-fprint-explicit-kinds` and `-fprint-equality-relations` flags, which led to some improvements in error message outputs. Along the way, I also tweaked the error-reporting machinery not to print out the type of a typed hole when the type is an unlifted equality, since it's kind (`TYPE ('TupleRep '[])`) was more confusing than anything. Test Plan: make test TEST="T15039a T15039b T15039c T15039d" Reviewers: simonpj, goldfire, bgamari Reviewed By: simonpj Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15039 Differential Revision: https://phabricator.haskell.org/D4696
Diffstat (limited to 'testsuite/tests/partial-sigs/should_compile/all.T')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/all.T6
1 files changed, 5 insertions, 1 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/all.T b/testsuite/tests/partial-sigs/should_compile/all.T
index 0a0483b139..bdfc13d284 100644
--- a/testsuite/tests/partial-sigs/should_compile/all.T
+++ b/testsuite/tests/partial-sigs/should_compile/all.T
@@ -75,4 +75,8 @@ test('T14217', normal, compile_fail, [''])
test('T14643', normal, compile, [''])
test('T14643a', normal, compile, [''])
test('T14715', normal, compile, [''])
-
+test('T15039a', normal, compile, [''])
+test('T15039b', normal, compile, ['-fprint-explicit-kinds'])
+test('T15039c', normal, compile, ['-fprint-equality-relations'])
+test('T15039d', normal, compile,
+ ['-fprint-explicit-kinds -fprint-equality-relations'])