diff options
Diffstat (limited to 'testsuite')
-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 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, ['']) |