diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-05-16 12:11:37 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-05-16 12:58:29 -0400 |
commit | 99f8cc84a5b23878b3b0732955cb651bc973e9f2 (patch) | |
tree | 4dc7d2d1061f99a2a29a6e6b8f4492dbd8e54c23 /testsuite/tests/roles | |
parent | 126b4125d95f7e4d272a9307cb8b634b11bd337f (diff) | |
download | haskell-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/roles')
-rw-r--r-- | testsuite/tests/roles/should_compile/Roles13.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/tests/roles/should_compile/Roles13.stderr b/testsuite/tests/roles/should_compile/Roles13.stderr index 67ff4035c3..29b7b2de26 100644 --- a/testsuite/tests/roles/should_compile/Roles13.stderr +++ b/testsuite/tests/roles/should_compile/Roles13.stderr @@ -14,7 +14,7 @@ convert :: Wrap Age -> Int convert = convert1 `cast` (<Wrap Age>_R ->_R Roles13.N:Wrap[0] (Roles13.N:Age[0]) - :: (Wrap Age -> Wrap Age :: *) ~R# (Wrap Age -> Int :: *)) + :: (Wrap Age -> Wrap Age) ~R# (Wrap Age -> Int)) -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} $trModule1 :: GHC.Prim.Addr# |