summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs
diff options
context:
space:
mode:
authorMichał Sośnicki <sosnicki.michal@gmail.com>2015-11-18 16:02:53 +0100
committerBen Gamari <ben@smart-cactus.org>2015-11-18 17:31:20 +0100
commitc61759d5917996a10b06a286eb5b776e4069e35c (patch)
tree7fc3b9a29cec4f98e28278d23e5000743d0d3956 /testsuite/tests/partial-sigs
parent07eb258dfcbf8a67e4e931397128b7255356d19e (diff)
downloadhaskell-c61759d5917996a10b06a286eb5b776e4069e35c.tar.gz
Fix inconsistent pretty-printing of type families
After the changes, the three functions used to print type families were identical, so they are refactored into one. Original RHSs of data instance declarations are recreated and printed in user error messages. RHSs containing representation TyCons are printed in the Coercion Axioms section in a typechecker dump. Add vbar to the list of SDocs exported by Outputable. Replace all text "|" docs with it. Fixes #10839 Reviewers: goldfire, jstolarek, austin, bgamari Reviewed By: jstolarek Subscribers: jstolarek, thomie Differential Revision: https://phabricator.haskell.org/D1441 GHC Trac Issues: #10839
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr3
-rw-r--r--testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr6
2 files changed, 6 insertions, 3 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
index dd1de7ed3b..ec41b123f1 100644
--- a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
@@ -6,7 +6,8 @@ TYPE CONSTRUCTORS
data family Sing (a :: k)
COERCION AXIOMS
axiom DataFamilyInstanceLHS.TFCo:R:SingMyKind_ ::
- Sing = DataFamilyInstanceLHS.R:SingMyKind_
+ Sing = DataFamilyInstanceLHS.R:SingMyKind_
+ -- Defined at DataFamilyInstanceLHS.hs:8:15
FAMILY INSTANCES
data instance Sing
Dependent modules: []
diff --git a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
index 44f05a7a68..ebd327c98f 100644
--- a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
@@ -3,8 +3,10 @@ TYPE SIGNATURES
TYPE CONSTRUCTORS
type family F a b :: * open
COERCION AXIOMS
- axiom TypeFamilyInstanceLHS.TFCo:R:FBool_ :: F Bool _ = Bool
- axiom TypeFamilyInstanceLHS.TFCo:R:FInt_ :: F Int _ = Int
+ axiom TypeFamilyInstanceLHS.TFCo:R:FBool_ ::
+ F Bool _ = Bool -- Defined at TypeFamilyInstanceLHS.hs:6:15
+ axiom TypeFamilyInstanceLHS.TFCo:R:FInt_ ::
+ F Int _ = Int -- Defined at TypeFamilyInstanceLHS.hs:5:15
FAMILY INSTANCES
type instance F Int _
type instance F Bool _