diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-10-31 09:15:41 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-10-31 09:15:41 +0000 |
commit | fcb4fe57e4bf83b7869ec24750eaac116e16df03 (patch) | |
tree | e4fd370178500e43386572da5d62250ce430f7f8 /testsuite | |
parent | f28972a13e9e1a25a1102a4ccd5955b0a60bb243 (diff) | |
download | haskell-fcb4fe57e4bf83b7869ec24750eaac116e16df03.tar.gz |
Wibbles to error messages
Diffstat (limited to 'testsuite')
6 files changed, 127 insertions, 90 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T2239.stderr b/testsuite/tests/indexed-types/should_fail/T2239.stderr index 42fdb7154f..5c0403c6f0 100644 --- a/testsuite/tests/indexed-types/should_fail/T2239.stderr +++ b/testsuite/tests/indexed-types/should_fail/T2239.stderr @@ -1,30 +1,28 @@ - -T2239.hs:47:13: - Couldn't match type `forall b1. MyEq b1 Bool => b1 -> b1' - with `b -> b' - Expected type: (forall b1. MyEq b1 Bool => b1 -> b1) -> b -> b - Actual type: (forall b. MyEq b Bool => b -> b) - -> forall b. MyEq b Bool => b -> b - In the expression: - id :: - (forall b. MyEq b Bool => b -> b) - -> (forall b. MyEq b Bool => b -> b) - In an equation for `complexFD': - complexFD - = id :: - (forall b. MyEq b Bool => b -> b) - -> (forall b. MyEq b Bool => b -> b) - -T2239.hs:50:13: - Couldn't match type `forall b1. b1 ~ Bool => b1 -> b1' - with `Bool -> Bool' - Expected type: (forall b1. b1 ~ Bool => b1 -> b1) -> b -> b - Actual type: (forall b. b ~ Bool => b -> b) - -> forall b. b ~ Bool => b -> b - In the expression: - id :: - (forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b) - In an equation for `complexTF': - complexTF - = id :: - (forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b) +
+T2239.hs:47:13:
+ Couldn't match type `b -> b'
+ with `forall b1. MyEq b1 Bool => b1 -> b1'
+ Expected type: (forall b1. MyEq b1 Bool => b1 -> b1) -> b -> b
+ Actual type: (b -> b) -> b -> b
+ In the expression:
+ id ::
+ (forall b. MyEq b Bool => b -> b)
+ -> (forall b. MyEq b Bool => b -> b)
+ In an equation for `complexFD':
+ complexFD
+ = id ::
+ (forall b. MyEq b Bool => b -> b)
+ -> (forall b. MyEq b Bool => b -> b)
+
+T2239.hs:50:13:
+ Couldn't match type `Bool -> Bool'
+ with `forall b1. b1 ~ Bool => b1 -> b1'
+ Expected type: (forall b1. b1 ~ Bool => b1 -> b1) -> b -> b
+ Actual type: (b -> b) -> b -> b
+ In the expression:
+ id ::
+ (forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b)
+ In an equation for `complexTF':
+ complexTF
+ = id ::
+ (forall b. b ~ Bool => b -> b) -> (forall b. b ~ Bool => b -> b)
diff --git a/testsuite/tests/indexed-types/should_fail/T5934.stderr b/testsuite/tests/indexed-types/should_fail/T5934.stderr index bb32907e73..387dde4dc6 100644 --- a/testsuite/tests/indexed-types/should_fail/T5934.stderr +++ b/testsuite/tests/indexed-types/should_fail/T5934.stderr @@ -1,6 +1,7 @@ - -T5934.hs:10:7: - No instance for (Num ((forall s. GenST s) -> Int)) - arising from the literal `0' - In the expression: 0 - In an equation for `run': run = 0 +
+T5934.hs:10:7:
+ Cannot instantiate unification variable `a0'
+ with a type involving foralls: (forall s. GenST s) -> Int
+ Perhaps you want -XImpredicativeTypes
+ In the expression: 0
+ In an equation for `run': run = 0
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)
|