summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-11-22 11:55:00 -0500
committerBen Gamari <ben@smart-cactus.org>2018-11-22 13:14:02 -0500
commitf5d2083807a03c57f194fcc3a7baf82e34aad524 (patch)
tree9853fb8ba47bbdd1488ded82672ca0087a7b2a98 /testsuite/tests/partial-sigs
parentff619555439a8fc671fffb239910972b054a7d96 (diff)
downloadhaskell-f5d2083807a03c57f194fcc3a7baf82e34aad524.tar.gz
Overhaul -fprint-explicit-kinds to use VKA
This patch changes the behavior of `-fprint-explicit-kinds` so that it displays kind argument using visible kind application. In other words, the flag now: 1. Prints instantiations of specified variables with `@(...)`. 2. Prints instantiations of inferred variables with `@{...}`. In addition, this patch removes the `Use -fprint-explicit-kinds to see the kind arguments` error message that often arises when a type mismatch occurs due to different kinds. Instead, whenever there is a kind mismatch, we now enable the `-fprint-explicit-kinds` flag locally to help cue to the programmer where the error lies. (See `Note [Kind arguments in error messages]` in `TcErrors`.) As a result, these funny `@{...}` things can now appear to the user even without turning on the `-fprint-explicit-kinds` flag explicitly, so I took the liberty of documenting them in the users' guide. Test Plan: ./validate Reviewers: goldfire, simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15871 Differential Revision: https://phabricator.haskell.org/D5314
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T15039b.stderr10
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T15039d.stderr10
2 files changed, 10 insertions, 10 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/T15039b.stderr b/testsuite/tests/partial-sigs/should_compile/T15039b.stderr
index 21ec20ae40..c28b94879b 100644
--- a/testsuite/tests/partial-sigs/should_compile/T15039b.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T15039b.stderr
@@ -37,21 +37,21 @@ T15039b.hs:25:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
ex3 :: Dict ((a :: *) ~~ (b :: k)) -> () (bound at T15039b.hs:25:1)
T15039b.hs:33:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Dict (Coercible * a b)’
+ • Found type wildcard ‘_’ standing for ‘Dict (Coercible @* a b)’
Where: ‘a’, ‘b’ are rigid type variables bound by
the type signature for:
- ex6 :: forall a b. Dict (Coercible * a b) -> ()
+ ex6 :: forall a b. Dict (Coercible @* a b) -> ()
at T15039b.hs:32:1-53
• In a pattern type signature: _
In the pattern: Dict :: _
In an equation for ‘ex6’: ex6 (Dict :: _) = ()
• Relevant bindings include
- ex6 :: Dict (Coercible * a b) -> () (bound at T15039b.hs:33:1)
+ ex6 :: Dict (Coercible @* a b) -> () (bound at T15039b.hs:33:1)
T15039b.hs:35:8: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Coercible * a b’
+ • Found type wildcard ‘_’ standing for ‘Coercible @* a b’
Where: ‘a’, ‘b’ are rigid type variables bound by
- the inferred type of ex7 :: Coercible * a b => Coercion * a b
+ the inferred type of ex7 :: Coercible @* a b => Coercion @{*} a b
at T15039b.hs:36:1-14
• In the type signature:
ex7 :: _ => Coercion (a :: Type) (b :: Type)
diff --git a/testsuite/tests/partial-sigs/should_compile/T15039d.stderr b/testsuite/tests/partial-sigs/should_compile/T15039d.stderr
index 620199a13c..cca94416b8 100644
--- a/testsuite/tests/partial-sigs/should_compile/T15039d.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T15039d.stderr
@@ -38,21 +38,21 @@ T15039d.hs:25:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
ex3 :: Dict ((a :: *) ~~ (b :: k)) -> () (bound at T15039d.hs:25:1)
T15039d.hs:33:14: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Dict (Coercible * a b)’
+ • Found type wildcard ‘_’ standing for ‘Dict (Coercible @* a b)’
Where: ‘a’, ‘b’ are rigid type variables bound by
the type signature for:
- ex6 :: forall a b. Dict (Coercible * a b) -> ()
+ ex6 :: forall a b. Dict (Coercible @* a b) -> ()
at T15039d.hs:32:1-53
• In a pattern type signature: _
In the pattern: Dict :: _
In an equation for ‘ex6’: ex6 (Dict :: _) = ()
• Relevant bindings include
- ex6 :: Dict (Coercible * a b) -> () (bound at T15039d.hs:33:1)
+ ex6 :: Dict (Coercible @* a b) -> () (bound at T15039d.hs:33:1)
T15039d.hs:35:8: warning: [-Wpartial-type-signatures (in -Wdefault)]
- • Found type wildcard ‘_’ standing for ‘Coercible * a b’
+ • Found type wildcard ‘_’ standing for ‘Coercible @* a b’
Where: ‘a’, ‘b’ are rigid type variables bound by
- the inferred type of ex7 :: Coercible * a b => Coercion * a b
+ the inferred type of ex7 :: Coercible @* a b => Coercion @{*} a b
at T15039d.hs:36:1-14
• In the type signature:
ex7 :: _ => Coercion (a :: Type) (b :: Type)