summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T8555.hs7
-rw-r--r--testsuite/tests/typecheck/should_compile/T8799.hs10
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T2
3 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T8555.hs b/testsuite/tests/typecheck/should_compile/T8555.hs
new file mode 100644
index 0000000000..c5e817b467
--- /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 0000000000..f5a92d4204
--- /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 562acba378..2f257eafee 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, [''])