summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-03-02 16:35:42 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2012-03-02 16:35:42 +0000
commit64880bb7693ca9a97e26a292b5d3fe402f72c143 (patch)
tree87885e83aab4d79fdc15922eba28ea0e63f622c1 /testsuite/tests/typecheck/should_compile
parent7a29e7e2e17b47360adfca59d049b77f8ec3f0f7 (diff)
downloadhaskell-64880bb7693ca9a97e26a292b5d3fe402f72c143.tar.gz
Modified error output and new tests for PolyKinds commit
Diffstat (limited to 'testsuite/tests/typecheck/should_compile')
-rw-r--r--testsuite/tests/typecheck/should_compile/FD1.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/FD2.stderr8
-rw-r--r--testsuite/tests/typecheck/should_compile/FD3.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc141.stderr43
4 files changed, 47 insertions, 10 deletions
diff --git a/testsuite/tests/typecheck/should_compile/FD1.stderr b/testsuite/tests/typecheck/should_compile/FD1.stderr
index 6f98877b84..0bec66931a 100644
--- a/testsuite/tests/typecheck/should_compile/FD1.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD1.stderr
@@ -4,9 +4,9 @@ FD1.hs:16:1:
from the context (E a (Int -> Int))
bound by the type signature for
plus :: E a (Int -> Int) => Int -> a
- at FD1.hs:16:1-16
+ at FD1.hs:15:9-38
`a' is a rigid type variable bound by
the type signature for plus :: E a (Int -> Int) => Int -> a
- at FD1.hs:16:1
+ at FD1.hs:15:12
The equation(s) for `plus' have two arguments,
but its type `Int -> a' has only one
diff --git a/testsuite/tests/typecheck/should_compile/FD2.stderr b/testsuite/tests/typecheck/should_compile/FD2.stderr
index 2b2fee3eb9..392f92723d 100644
--- a/testsuite/tests/typecheck/should_compile/FD2.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD2.stderr
@@ -7,19 +7,19 @@ FD2.hs:26:36:
or from (Elem a e)
bound by the type signature for
foldr1 :: Elem a e => (e -> e -> e) -> a -> e
- at FD2.hs:(22,3)-(26,39)
+ at FD2.hs:21:13-47
or from (Elem a e1)
bound by the type signature for
mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
- at FD2.hs:(25,12)-(26,39)
+ at FD2.hs:24:18-54
`e' is a rigid type variable bound by
the type signature for
foldr1 :: Elem a e => (e -> e -> e) -> a -> e
- at FD2.hs:22:3
+ at FD2.hs:21:20
`e1' is a rigid type variable bound by
the type signature for
mf :: Elem a e1 => e1 -> Maybe e1 -> Maybe e1
- at FD2.hs:25:12
+ at FD2.hs:24:25
In the first argument of `f', namely `x'
In the first argument of `Just', namely `(f x y)'
In the expression: Just (f x y)
diff --git a/testsuite/tests/typecheck/should_compile/FD3.stderr b/testsuite/tests/typecheck/should_compile/FD3.stderr
index 6f6aa8a1a2..9144b5fdb3 100644
--- a/testsuite/tests/typecheck/should_compile/FD3.stderr
+++ b/testsuite/tests/typecheck/should_compile/FD3.stderr
@@ -3,7 +3,7 @@ FD3.hs:15:15:
Couldn't match type `a' with `([Char], a)'
`a' is a rigid type variable bound by
the type signature for translate :: (String, a) -> A a
- at FD3.hs:15:1
+ at FD3.hs:14:23
When using functional dependencies to combine
MkA a a,
arising from the dependency `a -> b'
diff --git a/testsuite/tests/typecheck/should_compile/tc141.stderr b/testsuite/tests/typecheck/should_compile/tc141.stderr
index 2fdf1fa99c..0d08303345 100644
--- a/testsuite/tests/typecheck/should_compile/tc141.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc141.stderr
@@ -1,6 +1,43 @@
-tc141.hs:11:15: Not in scope: type variable `a'
+tc141.hs:11:12:
+ You cannot bind scoped type variable `a'
+ in a pattern binding signature
+ In the pattern: p :: a
+ In the pattern: (p :: a, q :: a)
+ In a pattern binding: (p :: a, q :: a) = x
-tc141.hs:11:20: Not in scope: type variable `a'
+tc141.hs:11:31:
+ Couldn't match expected type `a1' with actual type `a'
+ `a1' is a rigid type variable bound by
+ an expression type signature: a1 at tc141.hs:11:31
+ `a' is a rigid type variable bound by
+ the inferred type of f :: (a, a) -> (t, a) at tc141.hs:11:1
+ In the expression: q :: a
+ In the expression: (q :: a, p)
+ In the expression: let (p :: a, q :: a) = x in (q :: a, p)
-tc141.hs:13:16: Not in scope: type variable `a'
+tc141.hs:13:13:
+ You cannot bind scoped type variable `a'
+ in a pattern binding signature
+ In the pattern: y :: a
+ In a pattern binding: y :: a = a
+ In the expression:
+ let y :: a = a in
+ let
+ v :: a
+ v = b
+ in v
+
+tc141.hs:15:18:
+ Couldn't match expected type `a1' with actual type `t1'
+ `a1' is a rigid type variable bound by
+ the type signature for v :: a1 at tc141.hs:14:19
+ `t1' is a rigid type variable bound by
+ the inferred type of g :: t -> t1 -> a at tc141.hs:13:1
+ In the expression: b
+ In an equation for `v': v = b
+ In the expression:
+ let
+ v :: a
+ v = b
+ in v