[commit: ghc] master: Test Trac #10156 (817d2c3)

git at git.haskell.org git at git.haskell.org
Mon Mar 16 14:56:31 UTC 2015


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

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

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

commit 817d2c3436a99d998c79c5f9755c03aa21ced32c
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Mar 16 14:54:50 2015 +0000

    Test Trac #10156


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

817d2c3436a99d998c79c5f9755c03aa21ced32c
 testsuite/tests/typecheck/should_compile/T10156.hs | 15 +++++++++++++++
 testsuite/tests/typecheck/should_compile/all.T     |  1 +
 2 files changed, 16 insertions(+)

diff --git a/testsuite/tests/typecheck/should_compile/T10156.hs b/testsuite/tests/typecheck/should_compile/T10156.hs
new file mode 100644
index 0000000..d452122
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T10156.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE FlexibleContexts, TypeFamilies #-}
+
+module T10156 where
+
+import Data.Coerce
+
+data Iso a b = Iso (a -> b) (b -> a)
+
+coerceIso :: Coercible a b => Iso a b
+coerceIso = Iso coerce coerce
+
+type family F x
+
+f :: (Coercible a (F b), Coercible c (F b)) => a -> b -> c
+f x _ = coerce x
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 7b3fb9f..a4b497e 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -443,3 +443,4 @@ test('T9971', normal, compile, [''])
 test('T10031', normal, compile, [''])
 test('T10072', normal, compile_fail, [''])
 test('T10100', normal, compile, [''])
+test('T10156', normal, compile, [''])



More information about the ghc-commits mailing list