summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@richarde.dev>2022-02-22 10:55:43 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-02 14:10:28 -0500
commit1617fed3a97cd13b55a180029ab8fb9468d2b797 (patch)
treeff96d83626741712caa399e1401a960de8590962 /testsuite
parentf596c91aaede75f7293ac2214ad48018a6b7a753 (diff)
downloadhaskell-1617fed3a97cd13b55a180029ab8fb9468d2b797.tar.gz
Make inert_cycle_breakers into a stack.
Close #20231.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typecheck/should_compile/T20231.hs20
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T20231.hs b/testsuite/tests/typecheck/should_compile/T20231.hs
new file mode 100644
index 0000000000..f327f04217
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T20231.hs
@@ -0,0 +1,20 @@
+{-# LANGUAGE
+ DataKinds,
+ GADTs,
+ QuantifiedConstraints,
+ TypeFamilies
+ #-}
+
+module T20231 where
+
+type family Foo x where
+ Foo (Maybe a) = a
+
+data Bug1 a b c where
+ Bug1 :: (a ~ 'True => Show b, a ~ 'False => Show c) => Bug1 a b c
+
+data Bug2 f a b where
+ Bug2 :: (a ~ 'True => f b) => Bug2 f a b
+
+bug :: b ~ Maybe (Foo b) => Bug2 Show a (Foo b) -> Bug1 a (Foo b) Int
+bug Bug2 = Bug1
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 1b1cb1ec5a..6d9ae4c566 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -570,6 +570,7 @@ test('T13490', normal, compile, [''])
test('T13474', normal, compile, [''])
test('T13524', normal, compile, [''])
test('T20602', normal, compile, [''])
+test('T20231', normal, compile, [''])
test('T20582', normal, compile, [''])
test('T13509', normal, compile, [''])
test('T13526', normal, compile, [''])