[commit: ghc] master: Test Trac #11187 (f4f00c0)

git at git.haskell.org git at git.haskell.org
Thu Dec 10 10:54:54 UTC 2015


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

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

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

commit f4f00c0f28f3c21eb6f1396f48058c430c4e9b30
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Dec 10 10:55:10 2015 +0000

    Test Trac #11187


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

f4f00c0f28f3c21eb6f1396f48058c430c4e9b30
 testsuite/tests/indexed-types/should_compile/T11187.hs | 18 ++++++++++++++++++
 testsuite/tests/indexed-types/should_compile/all.T     |  1 +
 2 files changed, 19 insertions(+)

diff --git a/testsuite/tests/indexed-types/should_compile/T11187.hs b/testsuite/tests/indexed-types/should_compile/T11187.hs
new file mode 100644
index 0000000..4f636a6
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_compile/T11187.hs
@@ -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
diff --git a/testsuite/tests/indexed-types/should_compile/all.T b/testsuite/tests/indexed-types/should_compile/all.T
index 39b8a3a..5de25bf 100644
--- a/testsuite/tests/indexed-types/should_compile/all.T
+++ b/testsuite/tests/indexed-types/should_compile/all.T
@@ -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, [''])



More information about the ghc-commits mailing list