diff options
author | Richard Eisenberg <rae@richarde.dev> | 2022-02-22 10:55:43 +0100 |
---|---|---|
committer | Zubin Duggal <zubin.duggal@gmail.com> | 2022-05-09 13:35:54 +0530 |
commit | fb979c8b4098564f157092e6aa206e2c741eba16 (patch) | |
tree | 6074151345d5eea7348722bcd55a73f489138db6 /testsuite/tests | |
parent | 7fa56ee2298144044b731c3f7d74a2ed92991ecd (diff) | |
download | haskell-fb979c8b4098564f157092e6aa206e2c741eba16.tar.gz |
Make inert_cycle_breakers into a stack.
Close #20231.
(cherry picked from commit 1617fed3a97cd13b55a180029ab8fb9468d2b797)
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T20231.hs | 20 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 1 |
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 62861d741f..98d5912a9a 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -572,6 +572,7 @@ test('T13458', normal, compile, ['']) test('T13490', normal, compile, ['']) test('T13474', normal, compile, ['']) test('T13524', normal, compile, ['']) +test('T20231', normal, compile, ['']) test('T13509', normal, compile, ['']) test('T13526', normal, compile, ['']) test('T13594', normal, compile_fail, ['']) |