Test Trac #12885
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 28 Nov 2016 17:15:16 +0000 (17:15 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 28 Nov 2016 17:15:16 +0000 (17:15 +0000)
...which is fixed by

  commit 0476a64e70c91b326b53db2fc55adbbaa8e5c270
  Author: Simon Peyton Jones <simonpj@microsoft.com>
  Date:   Tue Oct 25 15:22:17 2016 +0100

    Fix a bug in mk_superclasses_of

testsuite/tests/polykinds/T12885.hs [new file with mode: 0644]
testsuite/tests/polykinds/all.T

diff --git a/testsuite/tests/polykinds/T12885.hs b/testsuite/tests/polykinds/T12885.hs
new file mode 100644 (file)
index 0000000..5da4981
--- /dev/null
@@ -0,0 +1,12 @@
+{-# LANGUAGE TypeFamilies, ConstraintKinds  #-}
+
+module Foo where
+
+import GHC.Exts
+
+f :: F [a] => a -> Bool
+f x = x == x
+
+type family F a :: Constraint
+type instance F [a] = (Show a, (Show a, (Show a, (Show a, (Show a,
+                       Show a, (Show a, (Show a, (Show a, (Show a, Eq a)))))))))
index 0e0d66a..db06932 100644 (file)
@@ -155,3 +155,4 @@ test('T12593', normal, compile_fail, [''])
 test('T12668', normal, compile, [''])
 test('T12718', normal, compile, [''])
 test('T12444', normal, compile_fail, [''])
+test('T12885', normal, compile, [''])