summaryrefslogtreecommitdiff
path: root/compiler/prelude
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 /compiler/prelude
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 'compiler/prelude')
-rw-r--r--compiler/prelude/TysWiredIn.hs-boot2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/prelude/TysWiredIn.hs-boot b/compiler/prelude/TysWiredIn.hs-boot
index 26e42010c9..b777fa187b 100644
--- a/compiler/prelude/TysWiredIn.hs-boot
+++ b/compiler/prelude/TysWiredIn.hs-boot
@@ -12,6 +12,8 @@ listTyCon :: TyCon
typeNatKind, typeSymbolKind :: Type
mkBoxedTupleTy :: [Type] -> Type
+coercibleTyCon, heqTyCon :: TyCon
+
liftedTypeKind :: Kind
constraintKind :: Kind