summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-10-02 17:47:21 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-10-07 08:03:31 +0100
commit48089ccf4f1f239b3268b2cb52b8aa0f7356485b (patch)
tree3cb31487ed2d7f9369f7d13a188e4f0167840009 /testsuite/tests/typecheck/should_fail
parent2b59c7ac3f23dd229ddff20d991528ac742dfd24 (diff)
downloadhaskell-48089ccf4f1f239b3268b2cb52b8aa0f7356485b.tar.gz
Use correct precedence when printing contexts with class operators
Fixes Trac #9658
Diffstat (limited to 'testsuite/tests/typecheck/should_fail')
-rw-r--r--testsuite/tests/typecheck/should_fail/ContextStack2.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr106
-rw-r--r--testsuite/tests/typecheck/should_fail/T5858.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T7857.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T8392a.stderr4
5 files changed, 58 insertions, 58 deletions
diff --git a/testsuite/tests/typecheck/should_fail/ContextStack2.stderr b/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
index e99e4c4264..746cf15d0c 100644
--- a/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
+++ b/testsuite/tests/typecheck/should_fail/ContextStack2.stderr
@@ -5,5 +5,5 @@ ContextStack2.hs:8:6:
(TF (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF a)))))))))),
TF (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF Int)))))))))))
~ TF (TF (TF (TF (TF (TF (TF (TF (TF (TF a)))))))))
- In the ambiguity check for: forall a. a ~ TF (a, Int) => Int
+ In the ambiguity check for: forall a. (a ~ TF (a, Int)) => Int
In the type signature for ‘t’: t :: (a ~ TF (a, Int)) => Int
diff --git a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
index 848920c181..80ab8d83f6 100644
--- a/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
+++ b/testsuite/tests/typecheck/should_fail/FrozenErrorTests.stderr
@@ -1,53 +1,53 @@
-
-FrozenErrorTests.hs:12:12:
- Couldn't match type ‘Int’ with ‘Bool’
- Inaccessible code in
- a pattern with constructor
- MkT3 :: forall a. a ~ Bool => T a,
- in a case alternative
- In the pattern: MkT3
- In a case alternative: MkT3 -> ()
- In the expression: case x of { MkT3 -> () }
-
-FrozenErrorTests.hs:26:9:
- Occurs check: cannot construct the infinite type: a ~ [a]
- Expected type: [a]
- Actual type: F a Bool
- Relevant bindings include
- test1 :: a (bound at FrozenErrorTests.hs:26:1)
- In the expression: goo1 False undefined
- In an equation for ‘test1’: test1 = goo1 False undefined
-
-FrozenErrorTests.hs:29:15:
- Couldn't match type ‘Int’ with ‘[Int]’
- Expected type: [[Int]]
- Actual type: F [Int] Bool
- In the first argument of ‘goo2’, namely ‘(goo1 False undefined)’
- In the expression: goo2 (goo1 False undefined)
- In an equation for ‘test2’: test2 = goo2 (goo1 False undefined)
-
-FrozenErrorTests.hs:30:9:
- Couldn't match type ‘[Int]’ with ‘Int’
- Expected type: [[Int]]
- Actual type: F [Int] Bool
- In the expression: goo1 False (goo2 undefined)
- In an equation for ‘test3’: test3 = goo1 False (goo2 undefined)
-
-FrozenErrorTests.hs:45:15:
- Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
- Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
- Actual type: F (T2 (T2 c c) c) Bool
- Relevant bindings include
- test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
- In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
- In the expression: goo4 (goo3 False undefined)
- In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
-
-FrozenErrorTests.hs:46:9:
- Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
- Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
- Actual type: F (T2 (T2 c c) c) Bool
- Relevant bindings include
- test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
- In the expression: goo3 False (goo4 undefined)
- In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
+
+FrozenErrorTests.hs:12:12:
+ Couldn't match type ‘Int’ with ‘Bool’
+ Inaccessible code in
+ a pattern with constructor
+ MkT3 :: forall a. (a ~ Bool) => T a,
+ in a case alternative
+ In the pattern: MkT3
+ In a case alternative: MkT3 -> ()
+ In the expression: case x of { MkT3 -> () }
+
+FrozenErrorTests.hs:26:9:
+ Occurs check: cannot construct the infinite type: a ~ [a]
+ Expected type: [a]
+ Actual type: F a Bool
+ Relevant bindings include
+ test1 :: a (bound at FrozenErrorTests.hs:26:1)
+ In the expression: goo1 False undefined
+ In an equation for ‘test1’: test1 = goo1 False undefined
+
+FrozenErrorTests.hs:29:15:
+ Couldn't match type ‘Int’ with ‘[Int]’
+ Expected type: [[Int]]
+ Actual type: F [Int] Bool
+ In the first argument of ‘goo2’, namely ‘(goo1 False undefined)’
+ In the expression: goo2 (goo1 False undefined)
+ In an equation for ‘test2’: test2 = goo2 (goo1 False undefined)
+
+FrozenErrorTests.hs:30:9:
+ Couldn't match type ‘[Int]’ with ‘Int’
+ Expected type: [[Int]]
+ Actual type: F [Int] Bool
+ In the expression: goo1 False (goo2 undefined)
+ In an equation for ‘test3’: test3 = goo1 False (goo2 undefined)
+
+FrozenErrorTests.hs:45:15:
+ Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
+ Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
+ Actual type: F (T2 (T2 c c) c) Bool
+ Relevant bindings include
+ test4 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:45:1)
+ In the first argument of ‘goo4’, namely ‘(goo3 False undefined)’
+ In the expression: goo4 (goo3 False undefined)
+ In an equation for ‘test4’: test4 = goo4 (goo3 False undefined)
+
+FrozenErrorTests.hs:46:9:
+ Couldn't match type ‘T2 c c’ with ‘M (T2 (T2 c c) c)’
+ Expected type: T2 (M (T2 (T2 c c) c)) (T2 (T2 c c) c)
+ Actual type: F (T2 (T2 c c) c) Bool
+ Relevant bindings include
+ test5 :: T2 (T2 c c) c (bound at FrozenErrorTests.hs:46:1)
+ In the expression: goo3 False (goo4 undefined)
+ In an equation for ‘test5’: test5 = goo3 False (goo4 undefined)
diff --git a/testsuite/tests/typecheck/should_fail/T5858.stderr b/testsuite/tests/typecheck/should_fail/T5858.stderr
index 9cd1deee69..1378bae9c2 100644
--- a/testsuite/tests/typecheck/should_fail/T5858.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5858.stderr
@@ -4,7 +4,7 @@ T5858.hs:11:7:
arising from a use of ‘infer’
The type variables ‘t0’, ‘t1’ are ambiguous
Note: there is a potential instance available:
- instance t1 ~ String => InferOverloaded (t1, t1)
+ instance (t1 ~ String) => InferOverloaded (t1, t1)
-- Defined at T5858.hs:8:10
In the expression: infer ([], [])
In an equation for ‘foo’: foo = infer ([], [])
diff --git a/testsuite/tests/typecheck/should_fail/T7857.stderr b/testsuite/tests/typecheck/should_fail/T7857.stderr
index 3519b3fa8d..6517b774f9 100644
--- a/testsuite/tests/typecheck/should_fail/T7857.stderr
+++ b/testsuite/tests/typecheck/should_fail/T7857.stderr
@@ -8,7 +8,7 @@ T7857.hs:8:11:
Note: there are several potential instances:
instance [safe] (PrintfArg a, PrintfType r) => PrintfType (a -> r)
-- Defined in ‘Text.Printf’
- instance [safe] a ~ () => PrintfType (IO a)
+ instance [safe] (a ~ ()) => PrintfType (IO a)
-- Defined in ‘Text.Printf’
instance [safe] IsChar c => PrintfType [c]
-- Defined in ‘Text.Printf’
diff --git a/testsuite/tests/typecheck/should_fail/T8392a.stderr b/testsuite/tests/typecheck/should_fail/T8392a.stderr
index ed33600a1e..9be12a5b0b 100644
--- a/testsuite/tests/typecheck/should_fail/T8392a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T8392a.stderr
@@ -2,6 +2,6 @@
T8392a.hs:6:8:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
- the type signature for foo :: Int ~ Bool => a -> a
- In the ambiguity check for: forall a. Int ~ Bool => a -> a
+ the type signature for foo :: (Int ~ Bool) => a -> a
+ In the ambiguity check for: forall a. (Int ~ Bool) => a -> a
In the type signature for ‘foo’: foo :: (Int ~ Bool) => a -> a