[commit: ghc] master: Test Trac #8799, #8555 (fc8c5e7)
git at git.haskell.org
git at git.haskell.org
Tue May 19 10:49:32 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/fc8c5e7a516803c04f2a38b53b9e8beb2066c056/ghc
>---------------------------------------------------------------
commit fc8c5e7a516803c04f2a38b53b9e8beb2066c056
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Tue May 19 11:48:53 2015 +0100
Test Trac #8799, #8555
>---------------------------------------------------------------
fc8c5e7a516803c04f2a38b53b9e8beb2066c056
testsuite/tests/typecheck/should_compile/T8555.hs | 7 +++++++
testsuite/tests/typecheck/should_compile/T8799.hs | 10 ++++++++++
testsuite/tests/typecheck/should_compile/all.T | 2 ++
3 files changed, 19 insertions(+)
diff --git a/testsuite/tests/typecheck/should_compile/T8555.hs b/testsuite/tests/typecheck/should_compile/T8555.hs
new file mode 100644
index 0000000..c5e817b
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T8555.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE FlexibleContexts #-}
+
+module T8555 where
+import Data.Coerce
+
+foo :: Coercible [a] [b] => a -> b
+foo = coerce
diff --git a/testsuite/tests/typecheck/should_compile/T8799.hs b/testsuite/tests/typecheck/should_compile/T8799.hs
new file mode 100644
index 0000000..f5a92d4
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T8799.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE FlexibleContexts #-}
+
+module T8555 where
+import Data.Coerce
+
+foo :: Coercible a b => b -> a
+foo = coerce
+
+bar :: (Coercible a b, Coercible b c) => b -> c -> a
+bar b c = coerce c
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 562acba..2f257ea 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -454,3 +454,5 @@ test('T10335', normal, compile, [''])
test('Improvement', normal, compile, [''])
test('T10009', normal, compile, [''])
test('T10390', normal, compile, [''])
+test('T8555', normal, compile, [''])
+test('T8799', normal, compile, [''])
More information about the ghc-commits
mailing list