summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-06-18 14:12:54 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-06-18 14:15:59 +0100
commit02bac0254182def11029e2f7373ba8d2ba9ebe44 (patch)
tree9b254a1af59a751f28af395b98b52b51b0d61a39 /testsuite/tests/ghci/scripts
parent4a7a6c3ac869f74dfe1c9af09c48faadc0ecba16 (diff)
downloadhaskell-02bac0254182def11029e2f7373ba8d2ba9ebe44.tar.gz
Remove some horrible munging of origins for Coercible
I just didn't think it was buying enough for all the cruft it caused. We can put some back if people start complaining about poor error messages. I forget quite how I tripped over this but I got sucked in. * Lots of tidying up in TcErrors * Rename pprArisingAt to pprCtLoc, by analogy with pprCtOrigin * Remove CoercibleOrigin data constructor from CtOrigin * Make relevantBindings return a Ct with a zonked and tidied CtOrigin * Add to TcRnTypes ctOrigin :: Ct -> CtOrigin ctEvOrigin :: CtEvidence -> CtOrigin setCtLoc :: Ct -> CtLoc -> Ct
Diffstat (limited to 'testsuite/tests/ghci/scripts')
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr64
-rw-r--r--testsuite/tests/ghci/scripts/T8649.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/ghci050.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/ghci051.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/ghci052.stderr24
-rw-r--r--testsuite/tests/ghci/scripts/ghci053.stderr12
6 files changed, 59 insertions, 59 deletions
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index 69e098a883..a3a3e9d061 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -1,5 +1,5 @@
-../../typecheck/should_run/Defer01.hs:11:40: Warning:
+../../typecheck/should_run/Defer01.hs:11:40: warning:
Couldn't match type ‘Char’ with ‘[Char]’
Expected type: String
Actual type: Char
@@ -7,17 +7,17 @@
In the second argument of ‘(>>)’, namely ‘putStr ','’
In the expression: putStr "Hello World" >> putStr ','
-../../typecheck/should_run/Defer01.hs:14:5: Warning:
+../../typecheck/should_run/Defer01.hs:14:5: warning:
Couldn't match expected type ‘Int’ with actual type ‘Char’
In the expression: 'p'
In an equation for ‘a’: a = 'p'
-../../typecheck/should_run/Defer01.hs:18:9: Warning:
+../../typecheck/should_run/Defer01.hs:18:9: warning:
No instance for (Eq B) arising from a use of ‘==’
In the expression: x == x
In an equation for ‘b’: b x = x == x
-../../typecheck/should_run/Defer01.hs:25:4: Warning:
+../../typecheck/should_run/Defer01.hs:25:4: warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
a pattern with constructor: C2 :: Bool -> C Bool,
@@ -25,14 +25,14 @@
In the pattern: C2 x
In an equation for ‘c’: c (C2 x) = True
-../../typecheck/should_run/Defer01.hs:28:5: Warning:
+../../typecheck/should_run/Defer01.hs:28:5: warning:
No instance for (Num (a -> a))
(maybe you haven't applied a function to enough arguments?)
arising from the literal ‘1’
In the expression: 1
In an equation for ‘d’: d = 1
-../../typecheck/should_run/Defer01.hs:31:5: Warning:
+../../typecheck/should_run/Defer01.hs:31:5: warning:
Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
Relevant bindings include
f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
@@ -41,11 +41,11 @@
In the expression: e 'q'
In an equation for ‘f’: f = e 'q'
-../../typecheck/should_run/Defer01.hs:34:8: Warning:
+../../typecheck/should_run/Defer01.hs:34:8: warning:
Couldn't match expected type ‘Char’ with actual type ‘a’
- ‘a’ is a rigid type variable bound by
- the type signature for: h :: a -> (Char, Char)
- at ../../typecheck/should_run/Defer01.hs:33:6
+ ‘a’ is a rigid type variable bound by
+ the type signature for: h :: a -> (Char, Char)
+ at ../../typecheck/should_run/Defer01.hs:33:6
Relevant bindings include
x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
h :: a -> (Char, Char)
@@ -53,7 +53,7 @@
In the expression: x
In the expression: (x, 'c')
-../../typecheck/should_run/Defer01.hs:39:17: Warning:
+../../typecheck/should_run/Defer01.hs:39:17: warning:
Couldn't match expected type ‘Bool’ with actual type ‘T a’
Relevant bindings include
a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
@@ -61,12 +61,12 @@
In the first argument of ‘not’, namely ‘(K a)’
In the expression: (not (K a))
-../../typecheck/should_run/Defer01.hs:43:5: Warning:
+../../typecheck/should_run/Defer01.hs:43:5: warning:
No instance for (MyClass a1) arising from a use of ‘myOp’
In the expression: myOp 23
In an equation for ‘j’: j = myOp 23
-../../typecheck/should_run/Defer01.hs:43:10: Warning:
+../../typecheck/should_run/Defer01.hs:43:10: warning:
No instance for (Num a1) arising from the literal ‘23’
The type variable ‘a1’ is ambiguous
Note: there are several potential instances:
@@ -78,7 +78,7 @@
In the expression: myOp 23
In an equation for ‘j’: j = myOp 23
-../../typecheck/should_run/Defer01.hs:45:6: Warning:
+../../typecheck/should_run/Defer01.hs:45:6: warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
the type signature for: k :: (Int ~ Bool) => Int -> Bool
@@ -87,30 +87,30 @@
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool
-../../typecheck/should_run/Defer01.hs:45:6: Warning:
+../../typecheck/should_run/Defer01.hs:45:6: warning:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
In the ambiguity check for the type signature for ‘k’:
k :: (Int ~ Bool) => Int -> Bool
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool
-../../typecheck/should_run/Defer01.hs:45:6: Warning:
+../../typecheck/should_run/Defer01.hs:45:6: warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
the type signature for: k :: (Int ~ Bool) => Int -> Bool
-../../typecheck/should_run/Defer01.hs:46:7: Warning:
+../../typecheck/should_run/Defer01.hs:46:7: warning:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
In the expression: x
In an equation for ‘k’: k x = x
-../../typecheck/should_run/Defer01.hs:49:5: Warning:
+../../typecheck/should_run/Defer01.hs:49:5: warning:
Couldn't match expected type ‘IO a0’
with actual type ‘Char -> IO ()’
Probable cause: ‘putChar’ is applied to too few arguments
In the first argument of ‘(>>)’, namely ‘putChar’
In the expression: putChar >> putChar 'p'
-*** Exception: ../../typecheck/should_run/Defer01.hs:11:40:
+*** Exception: ../../typecheck/should_run/Defer01.hs:11:40: error:
Couldn't match type ‘Char’ with ‘[Char]’
Expected type: String
Actual type: Char
@@ -118,31 +118,31 @@
In the second argument of ‘(>>)’, namely ‘putStr ','’
In the expression: putStr "Hello World" >> putStr ','
(deferred type error)
-*** Exception: ../../typecheck/should_run/Defer01.hs:14:5:
+*** Exception: ../../typecheck/should_run/Defer01.hs:14:5: error:
Couldn't match expected type ‘Int’ with actual type ‘Char’
In the expression: 'p'
In an equation for ‘a’: a = 'p'
(deferred type error)
-*** Exception: ../../typecheck/should_run/Defer01.hs:18:9:
+*** Exception: ../../typecheck/should_run/Defer01.hs:18:9: error:
No instance for (Eq B) arising from a use of ‘==’
In the expression: x == x
In an equation for ‘b’: b x = x == x
(deferred type error)
-<interactive>:8:11:
+<interactive>:8:11: error:
Couldn't match type ‘Bool’ with ‘Int’
Expected type: C Int
Actual type: C Bool
In the first argument of ‘c’, namely ‘(C2 True)’
In the first argument of ‘print’, namely ‘(c (C2 True))’
-*** Exception: ../../typecheck/should_run/Defer01.hs:28:5:
+*** Exception: ../../typecheck/should_run/Defer01.hs:28:5: error:
No instance for (Num (a -> a))
(maybe you haven't applied a function to enough arguments?)
arising from the literal ‘1’
In the expression: 1
In an equation for ‘d’: d = 1
(deferred type error)
-*** Exception: ../../typecheck/should_run/Defer01.hs:31:5:
+*** Exception: ../../typecheck/should_run/Defer01.hs:31:5: error:
Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
Relevant bindings include
f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1)
@@ -151,11 +151,11 @@
In the expression: e 'q'
In an equation for ‘f’: f = e 'q'
(deferred type error)
-*** Exception: ../../typecheck/should_run/Defer01.hs:34:8:
+*** Exception: ../../typecheck/should_run/Defer01.hs:34:8: error:
Couldn't match expected type ‘Char’ with actual type ‘a’
- ‘a’ is a rigid type variable bound by
- the type signature for: h :: a -> (Char, Char)
- at ../../typecheck/should_run/Defer01.hs:33:6
+ ‘a’ is a rigid type variable bound by
+ the type signature for: h :: a -> (Char, Char)
+ at ../../typecheck/should_run/Defer01.hs:33:6
Relevant bindings include
x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
h :: a -> (Char, Char)
@@ -163,7 +163,7 @@
In the expression: x
In the expression: (x, 'c')
(deferred type error)
-*** Exception: ../../typecheck/should_run/Defer01.hs:39:17:
+*** Exception: ../../typecheck/should_run/Defer01.hs:39:17: error:
Couldn't match expected type ‘Bool’ with actual type ‘T a’
Relevant bindings include
a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3)
@@ -171,18 +171,18 @@
In the first argument of ‘not’, namely ‘(K a)’
In the expression: (not (K a))
(deferred type error)
-*** Exception: ../../typecheck/should_run/Defer01.hs:43:5:
+*** Exception: ../../typecheck/should_run/Defer01.hs:43:5: error:
No instance for (MyClass a1) arising from a use of ‘myOp’
In the expression: myOp 23
In an equation for ‘j’: j = myOp 23
(deferred type error)
-<interactive>:14:8:
+<interactive>:14:8: error:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
In the first argument of ‘print’, namely ‘(k 2)’
In the expression: print (k 2)
In an equation for ‘it’: it = print (k 2)
-*** Exception: ../../typecheck/should_run/Defer01.hs:49:5:
+*** Exception: ../../typecheck/should_run/Defer01.hs:49:5: error:
Couldn't match expected type ‘IO a0’
with actual type ‘Char -> IO ()’
Probable cause: ‘putChar’ is applied to too few arguments
diff --git a/testsuite/tests/ghci/scripts/T8649.stderr b/testsuite/tests/ghci/scripts/T8649.stderr
index 1fe41defdc..257b112112 100644
--- a/testsuite/tests/ghci/scripts/T8649.stderr
+++ b/testsuite/tests/ghci/scripts/T8649.stderr
@@ -1,8 +1,8 @@
-<interactive>:5:4:
+<interactive>:5:4: error:
Couldn't match expected type ‘Ghci1.X’
with actual type ‘X’
- NB: ‘Ghci1.X’ is defined at <interactive>:2:1-14
- ‘X’ is defined at <interactive>:4:1-25
+ NB: ‘X’ is defined at <interactive>:4:1-25
+ ‘Ghci1.X’ is defined at <interactive>:2:1-14
In the first argument of ‘f’, namely ‘(Y 3)’
In the expression: f (Y 3)
diff --git a/testsuite/tests/ghci/scripts/ghci050.stderr b/testsuite/tests/ghci/scripts/ghci050.stderr
index 4c8de9da4e..d1df9b8379 100644
--- a/testsuite/tests/ghci/scripts/ghci050.stderr
+++ b/testsuite/tests/ghci/scripts/ghci050.stderr
@@ -1,9 +1,9 @@
-<interactive>:6:49:
+<interactive>:6:49: error:
Couldn't match expected type ‘ListableElem (a, a)’
with actual type ‘a’
- ‘a’ is a rigid type variable bound by
- the instance declaration at <interactive>:6:10
+ ‘a’ is a rigid type variable bound by
+ the instance declaration at <interactive>:6:10
Relevant bindings include
b :: a (bound at <interactive>:6:43)
a :: a (bound at <interactive>:6:41)
diff --git a/testsuite/tests/ghci/scripts/ghci051.stderr b/testsuite/tests/ghci/scripts/ghci051.stderr
index 3b6ad44d93..2a528e847a 100644
--- a/testsuite/tests/ghci/scripts/ghci051.stderr
+++ b/testsuite/tests/ghci/scripts/ghci051.stderr
@@ -1,9 +1,9 @@
-<interactive>:7:9:
+<interactive>:7:9: error:
Couldn't match type ‘T’
with ‘Ghci1.T’
- NB: ‘T’ is defined at <interactive>:6:1-16
- ‘Ghci1.T’ is defined at <interactive>:3:1-14
+ NB: ‘Ghci1.T’ is defined at <interactive>:3:1-14
+ ‘T’ is defined at <interactive>:6:1-16
Expected type: T'
Actual type: T
In the expression: C :: T'
diff --git a/testsuite/tests/ghci/scripts/ghci052.stderr b/testsuite/tests/ghci/scripts/ghci052.stderr
index b2b0c7613b..ce221887d6 100644
--- a/testsuite/tests/ghci/scripts/ghci052.stderr
+++ b/testsuite/tests/ghci/scripts/ghci052.stderr
@@ -1,32 +1,32 @@
-<interactive>:9:4:
+<interactive>:9:4: error:
Couldn't match expected type ‘Ghci1.Planet’
with actual type ‘Planet’
- NB: ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
- ‘Planet’ is defined at <interactive>:8:1-36
+ NB: ‘Planet’ is defined at <interactive>:8:1-36
+ ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
In the first argument of ‘pn’, namely ‘Mercury’
In the expression: pn Mercury
-<interactive>:10:4:
+<interactive>:10:4: error:
Couldn't match expected type ‘Ghci1.Planet’
with actual type ‘Planet’
- NB: ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
- ‘Planet’ is defined at <interactive>:8:1-36
+ NB: ‘Planet’ is defined at <interactive>:8:1-36
+ ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
In the first argument of ‘pn’, namely ‘Venus’
In the expression: pn Venus
-<interactive>:11:4:
+<interactive>:11:4: error:
Couldn't match expected type ‘Ghci1.Planet’
with actual type ‘Planet’
- NB: ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
- ‘Planet’ is defined at <interactive>:8:1-36
+ NB: ‘Planet’ is defined at <interactive>:8:1-36
+ ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
In the first argument of ‘pn’, namely ‘Mars’
In the expression: pn Mars
-<interactive>:13:44:
+<interactive>:13:44: error:
Couldn't match expected type ‘Planet’
with actual type ‘Ghci1.Planet’
- NB: ‘Planet’ is defined at <interactive>:8:1-36
- ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
+ NB: ‘Ghci1.Planet’ is defined at <interactive>:5:1-37
+ ‘Planet’ is defined at <interactive>:8:1-36
In the pattern: Earth
In an equation for ‘pn’: pn Earth = "E"
diff --git a/testsuite/tests/ghci/scripts/ghci053.stderr b/testsuite/tests/ghci/scripts/ghci053.stderr
index 2d91a51d21..fe6d6c9bef 100644
--- a/testsuite/tests/ghci/scripts/ghci053.stderr
+++ b/testsuite/tests/ghci/scripts/ghci053.stderr
@@ -1,16 +1,16 @@
-<interactive>:10:12:
+<interactive>:10:12: error:
Couldn't match expected type ‘Ghci1.Planet’
with actual type ‘Planet’
- NB: ‘Ghci1.Planet’ is defined at <interactive>:5:1-49
- ‘Planet’ is defined at <interactive>:8:1-41
+ NB: ‘Planet’ is defined at <interactive>:8:1-41
+ ‘Ghci1.Planet’ is defined at <interactive>:5:1-49
In the second argument of ‘(==)’, namely ‘Mercury’
In the expression: mercury == Mercury
-<interactive>:12:10:
+<interactive>:12:10: error:
Couldn't match expected type ‘Planet’
with actual type ‘Ghci1.Planet’
- NB: ‘Planet’ is defined at <interactive>:8:1-41
- ‘Ghci1.Planet’ is defined at <interactive>:5:1-49
+ NB: ‘Ghci1.Planet’ is defined at <interactive>:5:1-49
+ ‘Planet’ is defined at <interactive>:8:1-41
In the second argument of ‘(==)’, namely ‘Earth’
In the expression: Venus == Earth