[commit: testsuite] master: Wibbles following fix to Trac #8278 (9ca3219)
git at git.haskell.org
git at git.haskell.org
Wed Nov 6 16:56:10 UTC 2013
Repository : ssh://git@git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9ca32193a82218c18a633d1ae505248d65ef17a4/testsuite
>---------------------------------------------------------------
commit 9ca32193a82218c18a633d1ae505248d65ef17a4
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Wed Nov 6 16:55:54 2013 +0000
Wibbles following fix to Trac #8278
The error message for ghci052 and ghci053 are (still)
terrible, because there is shadowing going on in the
interactive context. But that's a separate matter.
>---------------------------------------------------------------
9ca32193a82218c18a633d1ae505248d65ef17a4
tests/ghci/scripts/ghci052.script | 2 ++
tests/ghci/scripts/ghci052.stderr | 16 ++++++++++++----
tests/ghci/scripts/ghci053.script | 2 ++
tests/ghci/scripts/ghci053.stderr | 8 ++++++--
tests/module/mod180.stderr | 5 ++++-
tests/typecheck/bug1465/bug1465.stderr | 2 ++
tests/typecheck/should_fail/tcfail182.stderr | 2 ++
7 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/tests/ghci/scripts/ghci052.script b/tests/ghci/scripts/ghci052.script
index 53e0093..c32d0fc 100644
--- a/tests/ghci/scripts/ghci052.script
+++ b/tests/ghci/scripts/ghci052.script
@@ -1,4 +1,6 @@
--Testing data type and constructor shadowing with functions
+-- Very unsatisfactory error messages
+
data Planet = Mercury | Venus | Earth
let pn Mercury = "M" ; pn Venus = "V" ; pn Earth = "E"
pn Mercury
diff --git a/tests/ghci/scripts/ghci052.stderr b/tests/ghci/scripts/ghci052.stderr
index 089785b..35977bf 100644
--- a/tests/ghci/scripts/ghci052.stderr
+++ b/tests/ghci/scripts/ghci052.stderr
@@ -1,24 +1,32 @@
-<interactive>:7:4:
+<interactive>:9:4:
Couldn't match expected type ‛main::Interactive.Planet’
with actual type ‛Planet’
+ NB: ‛main::Interactive.Planet’ is defined in ‛:Interactive’
+ ‛Planet’ is defined in ‛:Interactive’
In the first argument of ‛pn’, namely ‛Mercury’
In the expression: pn Mercury
-<interactive>:8:4:
+<interactive>:10:4:
Couldn't match expected type ‛main::Interactive.Planet’
with actual type ‛Planet’
+ NB: ‛main::Interactive.Planet’ is defined in ‛:Interactive’
+ ‛Planet’ is defined in ‛:Interactive’
In the first argument of ‛pn’, namely ‛Venus’
In the expression: pn Venus
-<interactive>:9:4:
+<interactive>:11:4:
Couldn't match expected type ‛main::Interactive.Planet’
with actual type ‛Planet’
+ NB: ‛main::Interactive.Planet’ is defined in ‛:Interactive’
+ ‛Planet’ is defined in ‛:Interactive’
In the first argument of ‛pn’, namely ‛Mars’
In the expression: pn Mars
-<interactive>:11:44:
+<interactive>:13:44:
Couldn't match expected type ‛Planet’
with actual type ‛main::Interactive.Planet’
+ NB: ‛Planet’ is defined in ‛:Interactive’
+ ‛main::Interactive.Planet’ is defined in ‛:Interactive’
In the pattern: Earth
In an equation for ‛pn’: pn Earth = "E"
diff --git a/tests/ghci/scripts/ghci053.script b/tests/ghci/scripts/ghci053.script
index cf104b5..43e0fbd 100644
--- a/tests/ghci/scripts/ghci053.script
+++ b/tests/ghci/scripts/ghci053.script
@@ -1,4 +1,6 @@
--Testing deriving in the presence of shadowing
+-- Very unsatisfactory error messages
+
data Planet = Mercury | Venus | Earth deriving Eq
let mercury = Mercury
Venus == Earth
diff --git a/tests/ghci/scripts/ghci053.stderr b/tests/ghci/scripts/ghci053.stderr
index 5f9b598..abb4009 100644
--- a/tests/ghci/scripts/ghci053.stderr
+++ b/tests/ghci/scripts/ghci053.stderr
@@ -1,12 +1,16 @@
-<interactive>:8:12:
+<interactive>:10:12:
Couldn't match expected type ‛main::Interactive.Planet’
with actual type ‛Planet’
+ NB: ‛main::Interactive.Planet’ is defined in ‛:Interactive’
+ ‛Planet’ is defined in ‛:Interactive’
In the second argument of ‛(==)’, namely ‛Mercury’
In the expression: mercury == Mercury
-<interactive>:10:10:
+<interactive>:12:10:
Couldn't match expected type ‛Planet’
with actual type ‛main::Interactive.Planet’
+ NB: ‛Planet’ is defined in ‛:Interactive’
+ ‛main::Interactive.Planet’ is defined in ‛:Interactive’
In the second argument of ‛(==)’, namely ‛Earth’
In the expression: Venus == Earth
diff --git a/tests/module/mod180.stderr b/tests/module/mod180.stderr
index 2647f2a..dd582e6 100644
--- a/tests/module/mod180.stderr
+++ b/tests/module/mod180.stderr
@@ -1,5 +1,8 @@
mod180.hs:8:5:
- Couldn't match expected type ‛T’ with actual type ‛main:Mod180_A.T’
+ Couldn't match expected type ‛T’
+ with actual type ‛main:Mod180_A.T’
+ NB: ‛T’ is defined in ‛Mod180_B’
+ ‛main:Mod180_A.T’ is defined in ‛Mod180_A’
In the expression: x
In an equation for ‛z’: z = x
diff --git a/tests/typecheck/bug1465/bug1465.stderr b/tests/typecheck/bug1465/bug1465.stderr
index 15f5f64..44b3de1 100644
--- a/tests/typecheck/bug1465/bug1465.stderr
+++ b/tests/typecheck/bug1465/bug1465.stderr
@@ -2,5 +2,7 @@
C.hs:6:11:
Couldn't match expected type ‛bug1465-1.0:A.T’
with actual type ‛A.T’
+ NB: ‛bug1465-1.0:A.T’ is defined in ‛A’ in package ‛bug1465-1.0’
+ ‛A.T’ is defined in ‛A’ in package ‛bug1465-2.0’
In the expression: B2.f
In the expression: [B1.f, B2.f]
diff --git a/tests/typecheck/should_fail/tcfail182.stderr b/tests/typecheck/should_fail/tcfail182.stderr
index 36768f6..1360b70 100644
--- a/tests/typecheck/should_fail/tcfail182.stderr
+++ b/tests/typecheck/should_fail/tcfail182.stderr
@@ -2,6 +2,8 @@
tcfail182.hs:9:3:
Couldn't match expected type ‛Prelude.Maybe a’
with actual type ‛Maybe t0’
+ NB: ‛Prelude.Maybe’ is defined in ‛Data.Maybe’ in package ‛base’
+ ‛Maybe’ is defined in ‛Foo’
Relevant bindings include
f :: Prelude.Maybe a -> Int (bound at tcfail182.hs:9:1)
In the pattern: Foo
More information about the ghc-commits
mailing list