Test Trac #11187
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 10 Dec 2015 10:55:10 +0000 (10:55 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 10 Dec 2015 10:55:10 +0000 (10:55 +0000)
testsuite/tests/indexed-types/should_compile/T11187.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_compile/all.T

diff --git a/testsuite/tests/indexed-types/should_compile/T11187.hs b/testsuite/tests/indexed-types/should_compile/T11187.hs
new file mode 100644 (file)
index 0000000..4f636a6
--- /dev/null
@@ -0,0 +1,18 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
+
+module T11187 where
+import Data.Type.Coercion
+
+type family X
+
+coercionXX :: Coercion X X
+coercionXX = Coercion
+
+coercionXX1 :: Coercion X X
+coercionXX1 = c where
+  c :: x ~ X => Coercion x x
+  c = Coercion
+
+coercionXX2 :: Coercion X X
+coercionXX2 = c where c = Coercion
index 39b8a3a..5de25bf 100644 (file)
@@ -265,3 +265,4 @@ test('T10753', normal, compile, [''])
 test('T10806', normal, compile_fail, [''])
 test('T10815', normal, compile, [''])
 test('T10931', normal, compile, [''])
+test('T11187', normal, compile, [''])