Test Trac #6022
authorSimon Peyton Jones <simonpj@microsoft.com>
Sun, 22 Apr 2012 17:25:32 +0000 (18:25 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Sun, 22 Apr 2012 17:25:32 +0000 (18:25 +0100)
testsuite/tests/typecheck/should_fail/T6022.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T6022.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T6022.hs b/testsuite/tests/typecheck/should_fail/T6022.hs
new file mode 100644 (file)
index 0000000..be2b9ca
--- /dev/null
@@ -0,0 +1,3 @@
+module T6022 where\r
+\r
+f x = x == head\r
diff --git a/testsuite/tests/typecheck/should_fail/T6022.stderr b/testsuite/tests/typecheck/should_fail/T6022.stderr
new file mode 100644 (file)
index 0000000..dffeccf
--- /dev/null
@@ -0,0 +1,6 @@
+\r
+T6022.hs:3:9:\r
+    No instance for (Eq ([a] -> a)) arising from a use of `=='\r
+    Possible fix: add an instance declaration for (Eq ([a] -> a))\r
+    In the expression: x == head\r
+    In an equation for `f': f x = x == head\r
index e0f95bf..99290c2 100644 (file)
@@ -273,3 +273,4 @@ test('T5684', normal, compile_fail, [''])
 test('T5858', normal, compile_fail, [''])
 test('T5957', normal, compile_fail, [''])
 test('T6001', normal, compile_fail, [''])
+test('T6022', normal, compile_fail, [''])