[commit: ghc] master: Wibble to implicit-parameter error message (8c9d0ce)
git at git.haskell.org
git at git.haskell.org
Fri Sep 26 11:35:00 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8c9d0ce490506fdc60d9f25d4b80774180cf92ce/ghc
>---------------------------------------------------------------
commit 8c9d0ce490506fdc60d9f25d4b80774180cf92ce
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Sep 26 10:48:25 2014 +0100
Wibble to implicit-parameter error message
>---------------------------------------------------------------
8c9d0ce490506fdc60d9f25d4b80774180cf92ce
compiler/typecheck/TcRnTypes.lhs | 2 +-
testsuite/tests/typecheck/should_fail/T5246.stderr | 10 ++++++----
testsuite/tests/typecheck/should_fail/T7525.stderr | 2 +-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/compiler/typecheck/TcRnTypes.lhs b/compiler/typecheck/TcRnTypes.lhs
index bff59ee..1be81cb 100644
--- a/compiler/typecheck/TcRnTypes.lhs
+++ b/compiler/typecheck/TcRnTypes.lhs
@@ -1734,7 +1734,7 @@ pprSkolInfo (SigSkol (FunSigCtxt f) ty)
2 (pprPrefixOcc f <+> dcolon <+> ppr ty)
pprSkolInfo (SigSkol cx ty) = hang (pprUserTypeCtxt cx <> colon)
2 (ppr ty)
-pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter bindings for")
+pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter binding") <> plural ips <+> ptext (sLit "for")
<+> pprWithCommas ppr ips
pprSkolInfo (ClsSkol cls) = ptext (sLit "the class declaration for") <+> quotes (ppr cls)
pprSkolInfo InstSkol = ptext (sLit "the instance declaration")
diff --git a/testsuite/tests/typecheck/should_fail/T5246.stderr b/testsuite/tests/typecheck/should_fail/T5246.stderr
index bd075cb..454c2b7 100644
--- a/testsuite/tests/typecheck/should_fail/T5246.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5246.stderr
@@ -1,9 +1,11 @@
T5246.hs:11:10:
- Could not deduce (?x::Int) arising from a use of ‘foo’
- from the context (?x::[Char])
- bound by the implicit-parameter bindings for ?x
- at T5246.hs:(10,7)-(11,12)
+ Couldn't match type ‘[Char]’ with ‘Int’
+ arising from a functional dependency between constraints:
+ ‘?x::Int’ arising from a use of ‘foo’ at T5246.hs:11:10-12
+ ‘?x::[Char]’
+ arising from the implicit-parameter binding for ?x
+ at T5246.hs:(10,7)-(11,12)
In the expression: foo
In the expression: let ?x = "hello" in foo
In an equation for ‘bar’: bar = let ?x = "hello" in foo
diff --git a/testsuite/tests/typecheck/should_fail/T7525.stderr b/testsuite/tests/typecheck/should_fail/T7525.stderr
index 9524d1a..ecf3eb1 100644
--- a/testsuite/tests/typecheck/should_fail/T7525.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7525.stderr
@@ -3,7 +3,7 @@ T7525.hs:5:30:
Could not deduce (?b::Bool)
arising from a use of implicit parameter ‘?b’
from the context (?a::Bool)
- bound by the implicit-parameter bindings for ?a at T7525.hs:5:7-31
+ bound by the implicit-parameter binding for ?a at T7525.hs:5:7-31
In the second argument of ‘(&&)’, namely ‘?b’
In the expression: ?a && ?b
In the expression: let ?a = True in ?a && ?b
More information about the ghc-commits
mailing list