summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-05 01:14:47 +0100
committerIan Lynagh <ian@well-typed.com>2012-10-05 01:14:47 +0100
commit2432082e30f6702041b6d4c6c0a6c92c66e4b248 (patch)
treee07d50becbe0919a1cadf934b541786b75e628f5
parentc0ca8ffe6c991265ff506f274862a7c6a33296f1 (diff)
parente11f19c2e50603422192fec87e081213c9c35020 (diff)
downloadhaskell-2432082e30f6702041b6d4c6c0a6c92c66e4b248.tar.gz
Merge branch 'master' of darcs.haskell.org:/srv/darcs//testsuite
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr42
-rw-r--r--testsuite/tests/typecheck/should_compile/T7050.hs3
-rw-r--r--testsuite/tests/typecheck/should_compile/T7050.stderr5
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
-rw-r--r--testsuite/tests/typecheck/should_fail/mc24.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail004.stderr6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail005.stderr3
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail140.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail189.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail206.stderr9
10 files changed, 65 insertions, 16 deletions
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index 28f8596698..db02b16308 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -12,6 +12,11 @@
In the expression: 'p'
In an equation for `a': a = 'p'
+../../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:
Couldn't match type `Int' with `Bool'
Inaccessible code in
@@ -21,6 +26,11 @@
In the pattern: C2 x
In an equation for `c': c (C2 x) = True
+../../typecheck/should_run/Defer01.hs:28:5: Warning:
+ No instance for (Num (a -> a)) arising from the literal `1'
+ In the expression: 1
+ In an equation for `d': d = 1
+
../../typecheck/should_run/Defer01.hs:31:5: Warning:
Couldn't match expected type `Char -> t' with actual type `Char'
Relevant bindings include
@@ -30,6 +40,19 @@
In the expression: e 'q'
In an equation for `f': f = e 'q'
+../../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
+ Relevant bindings include
+ h :: a -> (Char, Char)
+ (bound at ../../typecheck/should_run/Defer01.hs:34:1)
+ x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
+ In the expression: x
+ In the expression: (x, 'c')
+ In an equation for `h': h x = (x, 'c')
+
../../typecheck/should_run/Defer01.hs:39:17: Warning:
Couldn't match expected type `Bool' with actual type `T a'
Relevant bindings include
@@ -39,6 +62,25 @@
In the first argument of `not', namely `(K a)'
In the expression: (not (K a))
+../../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:
+ No instance for (Num a1) arising from the literal `23'
+ The type variable `a1' is ambiguous
+ Possible fix: add a type signature that fixes these type variable(s)
+ Note: there are several potential instances:
+ instance Num Double -- Defined in `GHC.Float'
+ instance Num Float -- Defined in `GHC.Float'
+ instance Integral a => Num (GHC.Real.Ratio a)
+ -- Defined in `GHC.Real'
+ ...plus three others
+ In the first argument of `myOp', namely `23'
+ In the expression: myOp 23
+ In an equation for `j': j = myOp 23
+
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match type `Int' with `Bool'
Inaccessible code in
diff --git a/testsuite/tests/typecheck/should_compile/T7050.hs b/testsuite/tests/typecheck/should_compile/T7050.hs
new file mode 100644
index 0000000000..2e8c1eb694
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T7050.hs
@@ -0,0 +1,3 @@
+module T7050 where
+
+data Foo a = Foo {-# UNPACK #-} !(Foo a)
diff --git a/testsuite/tests/typecheck/should_compile/T7050.stderr b/testsuite/tests/typecheck/should_compile/T7050.stderr
new file mode 100644
index 0000000000..e7330ce4f5
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T7050.stderr
@@ -0,0 +1,5 @@
+
+T7050.hs:3:14: Warning:
+ Ignoring unusable UNPACK pragma on the first argument of `Foo'
+ In the definition of data constructor `Foo'
+ In the data declaration for `Foo'
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index d5bedae7a8..8907143abf 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -386,3 +386,4 @@ test('T7171',normal,run_command,
['$MAKE -s --no-print-directory T7171'])
test('T7173', normal, compile, [''])
test('T7196', normal, compile, [''])
+test('T7050', normal, compile, [''])
diff --git a/testsuite/tests/typecheck/should_fail/mc24.stderr b/testsuite/tests/typecheck/should_fail/mc24.stderr
index 1249bc2f39..92b66b0464 100644
--- a/testsuite/tests/typecheck/should_fail/mc24.stderr
+++ b/testsuite/tests/typecheck/should_fail/mc24.stderr
@@ -1,7 +1,7 @@
mc24.hs:10:31:
- Couldn't match type `[a0]' with `a -> Integer'
- Expected type: (a -> Integer) -> [a] -> t [a]
+ Couldn't match type `[a0]' with `a -> a1'
+ Expected type: (a -> a1) -> [a] -> t [a]
Actual type: [a0] -> [a0]
In the return type of a call of `take'
Probable cause: `take' is applied to too many arguments
diff --git a/testsuite/tests/typecheck/should_fail/tcfail004.stderr b/testsuite/tests/typecheck/should_fail/tcfail004.stderr
index db24fb2109..112a3aab38 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail004.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail004.stderr
@@ -1,9 +1,9 @@
tcfail004.hs:3:9:
- Couldn't match expected type `(t, t1)'
- with actual type `(Integer, Integer, Integer)'
+ Couldn't match expected type `(t, t3)'
+ with actual type `(t0, t1, t2)'
Relevant bindings include
- g :: t1 (bound at tcfail004.hs:3:4)
+ g :: t3 (bound at tcfail004.hs:3:4)
f :: t (bound at tcfail004.hs:3:2)
In the expression: (1, 2, 3)
In a pattern binding: (f, g) = (1, 2, 3)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail005.stderr b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
index 9cfae02e1f..fa97c98b06 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail005.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail005.stderr
@@ -1,7 +1,6 @@
tcfail005.hs:3:9:
- Couldn't match expected type `[t]'
- with actual type `(Integer, Char)'
+ Couldn't match expected type `[t]' with actual type `(t0, Char)'
Relevant bindings include
i :: [t] (bound at tcfail005.hs:3:4)
h :: t (bound at tcfail005.hs:3:2)
diff --git a/testsuite/tests/typecheck/should_fail/tcfail140.stderr b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
index 0d9cd3404e..4315837a2e 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail140.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail140.stderr
@@ -1,6 +1,6 @@
tcfail140.hs:10:7:
- Couldn't match expected type `Integer -> t' with actual type `Int'
+ Couldn't match expected type `a0 -> t' with actual type `Int'
Relevant bindings include bar :: t (bound at tcfail140.hs:10:1)
The function `f' is applied to two arguments,
but its type `Int -> Int' has only one
@@ -8,7 +8,7 @@ tcfail140.hs:10:7:
In an equation for `bar': bar = f 3 9
tcfail140.hs:12:10:
- Couldn't match expected type `Integer -> t1' with actual type `Int'
+ Couldn't match expected type `a1 -> t1' with actual type `Int'
Relevant bindings include
rot :: t -> t1 (bound at tcfail140.hs:12:1)
The operator `f' takes two arguments,
diff --git a/testsuite/tests/typecheck/should_fail/tcfail189.stderr b/testsuite/tests/typecheck/should_fail/tcfail189.stderr
index 0e953563d4..6364cc2d5b 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail189.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail189.stderr
@@ -1,7 +1,7 @@
tcfail189.hs:10:31:
- Couldn't match type `[a0]' with `a -> Integer'
- Expected type: (a -> Integer) -> [a] -> [[a]]
+ Couldn't match type `[a0]' with `a -> a1'
+ Expected type: (a -> a1) -> [a] -> [[a]]
Actual type: [a0] -> [a0]
In the return type of a call of `take'
Probable cause: `take' is applied to too many arguments
diff --git a/testsuite/tests/typecheck/should_fail/tcfail206.stderr b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
index 706933dc9a..b5b9aef830 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail206.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail206.stderr
@@ -7,9 +7,9 @@ tcfail206.hs:5:5:
In an equation for `a': a = (, True)
tcfail206.hs:8:5:
- Couldn't match type `(Integer, Int)' with `Bool -> (Int, Bool)'
+ Couldn't match type `(t0, Int)' with `Bool -> (Int, Bool)'
Expected type: Int -> Bool -> (Int, Bool)
- Actual type: Int -> (Integer, Int)
+ Actual type: Int -> (t0, Int)
In the expression: (1,)
In an equation for `b': b = (1,)
@@ -21,9 +21,8 @@ tcfail206.hs:14:5:
In an equation for `d': d = (# , True #)
tcfail206.hs:17:5:
- Couldn't match type `(# Integer, Int #)'
- with `Bool -> (# Int, Bool #)'
+ Couldn't match type `(# a0, Int #)' with `Bool -> (# Int, Bool #)'
Expected type: Int -> Bool -> (# Int, Bool #)
- Actual type: Int -> (# Integer, Int #)
+ Actual type: Int -> (# a0, Int #)
In the expression: (# 1, #)
In an equation for `e': e = (# 1, #)