[commit: ghc] master: Test Trac #11274 (ed213ea)

git at git.haskell.org git at git.haskell.org
Wed Dec 23 07:46:10 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ed213ead5e92aa3c2ae830a00f06684a1028d3ad/ghc

>---------------------------------------------------------------

commit ed213ead5e92aa3c2ae830a00f06684a1028d3ad
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Dec 22 15:49:24 2015 +0000

    Test Trac #11274


>---------------------------------------------------------------

ed213ead5e92aa3c2ae830a00f06684a1028d3ad
 testsuite/tests/typecheck/should_fail/T11274.hs     | 10 ++++++++++
 testsuite/tests/typecheck/should_fail/T11274.stderr |  5 +++++
 testsuite/tests/typecheck/should_fail/all.T         |  1 +
 3 files changed, 16 insertions(+)

diff --git a/testsuite/tests/typecheck/should_fail/T11274.hs b/testsuite/tests/typecheck/should_fail/T11274.hs
new file mode 100644
index 0000000..2109cdf
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T11274.hs
@@ -0,0 +1,10 @@
+{-# OPTIONS_GHC -fdefer-typed-holes #-}
+
+module T11274 where
+
+data Asd = Asd
+
+someHole = _asd
+
+missingInstance :: Asd -> Asd -> Bool
+missingInstance x y = x == y
diff --git a/testsuite/tests/typecheck/should_fail/T11274.stderr b/testsuite/tests/typecheck/should_fail/T11274.stderr
new file mode 100644
index 0000000..f731317
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T11274.stderr
@@ -0,0 +1,5 @@
+
+T11274.hs:10:25: error:
+    • No instance for (Eq Asd) arising from a use of ‘==’
+    • In the expression: x == y
+      In an equation for ‘missingInstance’: missingInstance x y = x == y
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 27aa70b..8d8d430 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -395,3 +395,4 @@ test('CustomTypeErrors02', normal, compile_fail, [''])
 test('CustomTypeErrors03', normal, compile_fail, [''])
 test('T11112', normal, compile_fail, [''])
 test('ClassOperator', normal, compile_fail, [''])
+test('T11274', normal, compile_fail, [''])



More information about the ghc-commits mailing list