summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-03-10 11:10:21 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2014-03-10 11:11:30 +0000
commitf521a26cb741409011137115d17232df901c3c94 (patch)
treeb4a61f4bf2dc695e3525d6d61f0dbf428bd29776 /testsuite/tests/deriving
parent9d14262299fe721e49eb0efadebca9d095c834b3 (diff)
downloadhaskell-f521a26cb741409011137115d17232df901c3c94.tar.gz
Unify, rather than match, in GND processing (fixes Trac #8865)
Yet another small way in which polymorphic kinds needs a bit of care See Note [Unify kinds in deriving] in TcDeriv
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r--testsuite/tests/deriving/should_compile/T8865.hs11
-rw-r--r--testsuite/tests/deriving/should_compile/all.T1
2 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T8865.hs b/testsuite/tests/deriving/should_compile/T8865.hs
new file mode 100644
index 0000000000..ec6c26a22a
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/T8865.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+
+module T8865 where
+import Control.Category
+
+instance Category Either where
+ id = error "urk1"
+ (.) = error "urk2"
+
+newtype T a b = MkT (Either a b) deriving( Category )
+
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index 5d9c7337f1..b34290f2c4 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -46,3 +46,4 @@ test('T8631', normal, compile, [''])
test('T8758', extra_clean(['T8758a.o', 'T8758a.hi']), multimod_compile, ['T8758a', '-v0'])
test('T8851', expect_broken(8851), compile, [''])
test('T8678', normal, compile, [''])
+test('T8865', normal, compile, [''])