diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/stranal/should_compile/T21265.hs | 15 | ||||
-rw-r--r-- | testsuite/tests/stranal/should_compile/all.T | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/stranal/should_compile/T21265.hs b/testsuite/tests/stranal/should_compile/T21265.hs new file mode 100644 index 0000000000..d1a7c5a0b8 --- /dev/null +++ b/testsuite/tests/stranal/should_compile/T21265.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE RankNTypes #-} + +module T21265 (extractorProduct') where + +class GSerialiseProduct f where + dummy :: f x -> () + productExtractor :: TransFusion [] ((->) Bool) (f Int) + +extractorProduct' :: GSerialiseProduct f => Maybe (f Int) +extractorProduct' = unTransFusion productExtractor go + +go :: f x -> Maybe (g x) +go _ = Nothing + +newtype TransFusion f g a = TransFusion { unTransFusion :: forall h. Applicative h => (forall x. f x -> h (g x)) -> h a } diff --git a/testsuite/tests/stranal/should_compile/all.T b/testsuite/tests/stranal/should_compile/all.T index 2698a3a851..47d2130346 100644 --- a/testsuite/tests/stranal/should_compile/all.T +++ b/testsuite/tests/stranal/should_compile/all.T @@ -83,3 +83,4 @@ test('T20817', [ grep_errmsg(r'Str') ], compile, ['-dsuppress-uniques -ddump-str test('T21150', [ grep_errmsg(r'( t\d? :: Int)') ], compile, ['-dsuppress-uniques -ddump-exitify']) # T21128: Check that y is not reboxed in $wtheresCrud test('T21128', [ grep_errmsg(r'let { y = I\#') ], multimod_compile, ['T21128', '-v0 -dsuppress-uniques -dsuppress-all -ddump-simpl']) +test('T21265', normal, compile, ['']) |