summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-01-10 09:28:11 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2014-01-10 09:28:11 +0000
commitd154b7be262fd0a3a415ca6256a9bcc80e4ce6da (patch)
treee26cd414e966945400d274124dcefc394f48cde2 /testsuite
parent21b324539aaa0bfe883c6f90cc8ea5ab63dc769d (diff)
downloadhaskell-d154b7be262fd0a3a415ca6256a9bcc80e4ce6da.tar.gz
Test Trac #8651
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/indexed-types/should_compile/T8651.hs14
-rw-r--r--testsuite/tests/indexed-types/should_compile/all.T1
2 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_compile/T8651.hs b/testsuite/tests/indexed-types/should_compile/T8651.hs
new file mode 100644
index 0000000000..a13c91b2d1
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/T8651.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE RankNTypes, FlexibleContexts, TypeFamilies #-}
+module T8651 where
+
+import Data.Monoid
+
+type family Id a
+
+type instance Id a = a
+ --type instance Id [a] = [Id a]
+
+foo :: (Monoid (Id String) => r) -> r
+foo x = x
+
+bar = foo "Hello"
diff --git a/testsuite/tests/indexed-types/should_compile/all.T b/testsuite/tests/indexed-types/should_compile/all.T
index 66e30b28f2..3b69ec9fc1 100644
--- a/testsuite/tests/indexed-types/should_compile/all.T
+++ b/testsuite/tests/indexed-types/should_compile/all.T
@@ -238,3 +238,4 @@ test('ClosedFam1', extra_clean(['ClosedFam1.o-boot', 'ClosedFam1.hi-boot']),
multimod_compile, ['ClosedFam1', '-v0'])
test('ClosedFam2', extra_clean(['ClosedFam2.o-boot', 'ClosedFam2.hi-boot']),
multimod_compile, ['ClosedFam2', '-v0'])
+test('T8651', normal, compile, [''])