summaryrefslogtreecommitdiff
path: root/testsuite/tests/backpack
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-03-10 11:46:50 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2017-03-10 16:05:21 +0000
commit48d1866e9051e52b80c9c88547bd66d66483f1d5 (patch)
tree72047939e1bad05062f7518db97b6c999d32c948 /testsuite/tests/backpack
parent7e96526ac2ef5987ecb03217d3d616b6281c1441 (diff)
downloadhaskell-48d1866e9051e52b80c9c88547bd66d66483f1d5.tar.gz
Improve error messages for skolems
In error messages like this • Couldn't match type ‘c’ with ‘f0 (a -> b)’ ‘c’ is a rigid type variable bound by the type signature for: f :: ((a -> b) -> b) -> forall c. c -> a we need to take case both to actually show that 'forall c', and to make sure that its name lines with the 'c' in the error message. This has been shaky for some time, and this commit puts it on solid ground. See TcRnTypes: Note [SigSkol SkolemInfo] The main changes are * SigSkol gets an extra field that records the way in which the type signature was skolemised. * The type in SigSkol is now the /un/-skolemised version * pprSkolemInfo uses the info to make the tidy type line up nicely Lots of error message wibbles!
Diffstat (limited to 'testsuite/tests/backpack')
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail24.stderr2
-rw-r--r--testsuite/tests/backpack/should_fail/bkpfail44.stderr2
2 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/backpack/should_fail/bkpfail24.stderr b/testsuite/tests/backpack/should_fail/bkpfail24.stderr
index 53312d23fe..ef6a7d6c01 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail24.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail24.stderr
@@ -7,7 +7,7 @@ bkpfail24.bkp:14:15: error:
• Could not deduce: a ~ b
from the context: {H1.T} ~ {H2.T}
bound by the type signature for:
- f :: {H1.T} ~ {H2.T} => a -> b
+ f :: forall a b. {H1.T} ~ {H2.T} => a -> b
at bkpfail24.bkp:13:9-34
‘a’ is a rigid type variable bound by
the type signature for:
diff --git a/testsuite/tests/backpack/should_fail/bkpfail44.stderr b/testsuite/tests/backpack/should_fail/bkpfail44.stderr
index 127083f453..c16b2f2527 100644
--- a/testsuite/tests/backpack/should_fail/bkpfail44.stderr
+++ b/testsuite/tests/backpack/should_fail/bkpfail44.stderr
@@ -6,7 +6,7 @@ bkpfail44.bkp:10:15: error:
• Could not deduce: a ~ b
from the context: Coercible (T a) (T b)
bound by the type signature for:
- f :: Coercible (T a) (T b) => a -> b
+ f :: forall a b. Coercible (T a) (T b) => a -> b
at bkpfail44.bkp:9:9-44
‘a’ is a rigid type variable bound by
the type signature for: