summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-10-31 09:15:41 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2012-10-31 09:15:41 +0000
commitfcb4fe57e4bf83b7869ec24750eaac116e16df03 (patch)
treee4fd370178500e43386572da5d62250ce430f7f8 /testsuite/tests/typecheck/should_fail
parentf28972a13e9e1a25a1102a4ccd5955b0a60bb243 (diff)
downloadhaskell-fcb4fe57e4bf83b7869ec24750eaac116e16df03.tar.gz
Wibbles to error messages
Diffstat (limited to 'testsuite/tests/typecheck/should_fail')
-rw-r--r--testsuite/tests/typecheck/should_fail/T5570.stderr18
-rw-r--r--testsuite/tests/typecheck/should_fail/T5689.stderr49
-rw-r--r--testsuite/tests/typecheck/should_fail/T5691.stderr25
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail133.stderr54
4 files changed, 92 insertions, 54 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T5570.stderr b/testsuite/tests/typecheck/should_fail/T5570.stderr
index 63229e6aaf..d45eec581d 100644
--- a/testsuite/tests/typecheck/should_fail/T5570.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5570.stderr
@@ -1,9 +1,9 @@
-
-T5570.hs:7:16:
- Couldn't match kind `*' with `#'
- When matching types
- t0 :: *
- Double# :: #
- In the second argument of `($)', namely `D# $ 3.0##'
- In the expression: print $ D# $ 3.0##
- In an equation for `main': main = print $ D# $ 3.0##
+
+T5570.hs:7:16:
+ Couldn't match kind `*' with `#'
+ When matching types
+ s0 :: *
+ Double# :: #
+ In the second argument of `($)', namely `D# $ 3.0##'
+ In the expression: print $ D# $ 3.0##
+ In an equation for `main': main = print $ D# $ 3.0##
diff --git a/testsuite/tests/typecheck/should_fail/T5689.stderr b/testsuite/tests/typecheck/should_fail/T5689.stderr
index ca4562eca4..4bd1210784 100644
--- a/testsuite/tests/typecheck/should_fail/T5689.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5689.stderr
@@ -1,10 +1,39 @@
-
-T5689.hs:10:36:
- Couldn't match expected type `Bool' with actual type `t'
- Relevant bindings include
- r :: IORef (t -> t) (bound at T5689.hs:7:14)
- v :: t (bound at T5689.hs:10:28)
- In the expression: v
- In the expression: if v then False else True
- In the second argument of `writeIORef', namely
- `(\ v -> if v then False else True)'
+
+T5689.hs:10:36:
+ Couldn't match expected type `Bool' with actual type `t'
+ Relevant bindings include
+ r :: IORef (t -> t) (bound at T5689.hs:7:14)
+ v :: t (bound at T5689.hs:10:28)
+ In the expression: v
+ In the expression: if v then False else True
+ In the second argument of `writeIORef', namely
+ `(\ v -> if v then False else True)'
+
+T5689.hs:10:43:
+ Couldn't match expected type `t' with actual type `Bool'
+ Relevant bindings include
+ r :: IORef (t -> t) (bound at T5689.hs:7:14)
+ v :: t (bound at T5689.hs:10:28)
+ In the expression: False
+ In the expression: if v then False else True
+ In the second argument of `writeIORef', namely
+ `(\ v -> if v then False else True)'
+
+T5689.hs:10:54:
+ Couldn't match expected type `t' with actual type `Bool'
+ Relevant bindings include
+ r :: IORef (t -> t) (bound at T5689.hs:7:14)
+ v :: t (bound at T5689.hs:10:28)
+ In the expression: True
+ In the expression: if v then False else True
+ In the second argument of `writeIORef', namely
+ `(\ v -> if v then False else True)'
+
+T5689.hs:14:23:
+ Couldn't match expected type `t' with actual type `Bool'
+ Relevant bindings include
+ r :: IORef (t -> t) (bound at T5689.hs:7:14)
+ c :: t -> t (bound at T5689.hs:12:13)
+ In the first argument of `c', namely `True'
+ In the second argument of `($)', namely `c True'
+ In a stmt of a 'do' block: print $ c True
diff --git a/testsuite/tests/typecheck/should_fail/T5691.stderr b/testsuite/tests/typecheck/should_fail/T5691.stderr
index 4e2974485c..fc517c2d48 100644
--- a/testsuite/tests/typecheck/should_fail/T5691.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5691.stderr
@@ -1,8 +1,17 @@
-
-T5691.hs:14:9:
- Couldn't match type `p' with `PrintRuleInterp'
- Expected type: p a
- Actual type: PrintRuleInterp a
- In the pattern: f :: p a
- In an equation for `test': test (f :: p a) = MkPRI $ printRule_ f
- In the instance declaration for `Test PrintRuleInterp'
+
+T5691.hs:14:9:
+ Couldn't match type `p' with `PrintRuleInterp'
+ Expected type: PrintRuleInterp a
+ Actual type: p a
+ In the pattern: f :: p a
+ In an equation for `test': test (f :: p a) = MkPRI $ printRule_ f
+ In the instance declaration for `Test PrintRuleInterp'
+
+T5691.hs:15:24:
+ Couldn't match type `p' with `PrintRuleInterp'
+ Expected type: PrintRuleInterp a
+ Actual type: p a
+ Relevant bindings include f :: p a (bound at T5691.hs:14:9)
+ In the first argument of `printRule_', namely `f'
+ In the second argument of `($)', namely `printRule_ f'
+ In the expression: MkPRI $ printRule_ f
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
index ed65b28a8e..b18a27f4c7 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr
@@ -1,27 +1,27 @@
-
-tcfail133.hs:2:61: Warning:
- -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
-
-tcfail133.hs:68:7:
- No instance for (Show t0) arising from a use of `show'
- The type variable `t0' is ambiguous
- Possible fix: add a type signature that fixes these type variable(s)
- Note: there are several potential instances:
- instance Show Zero -- Defined at tcfail133.hs:8:29
- instance Show One -- Defined at tcfail133.hs:9:28
- instance (Show a, Show b, Number a, Digit b) => Show (a :@ b)
- -- Defined at tcfail133.hs:11:54
- ...plus 26 others
- In the expression: show
- In the expression: show $ add (One :@ Zero) (One :@ One)
- In an equation for `foo':
- foo = show $ add (One :@ Zero) (One :@ One)
-
-tcfail133.hs:68:14:
- No instance for (AddDigit (Zero :@ (One :@ One)) One t0)
- arising from a use of `add'
- In the second argument of `($)', namely
- `add (One :@ Zero) (One :@ One)'
- In the expression: show $ add (One :@ Zero) (One :@ One)
- In an equation for `foo':
- foo = show $ add (One :@ Zero) (One :@ One)
+
+tcfail133.hs:2:61: Warning:
+ -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
+
+tcfail133.hs:68:7:
+ No instance for (Show s0) arising from a use of `show'
+ The type variable `s0' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Show Zero -- Defined at tcfail133.hs:8:29
+ instance Show One -- Defined at tcfail133.hs:9:28
+ instance (Show a, Show b, Number a, Digit b) => Show (a :@ b)
+ -- Defined at tcfail133.hs:11:54
+ ...plus 26 others
+ In the expression: show
+ In the expression: show $ add (One :@ Zero) (One :@ One)
+ In an equation for `foo':
+ foo = show $ add (One :@ Zero) (One :@ One)
+
+tcfail133.hs:68:14:
+ No instance for (AddDigit (Zero :@ (One :@ One)) One s0)
+ arising from a use of `add'
+ In the second argument of `($)', namely
+ `add (One :@ Zero) (One :@ One)'
+ In the expression: show $ add (One :@ Zero) (One :@ One)
+ In an equation for `foo':
+ foo = show $ add (One :@ Zero) (One :@ One)