diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T22471.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/all.T | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T22471.hs b/testsuite/tests/simplCore/should_compile/T22471.hs new file mode 100644 index 0000000000..8da285a4c6 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T22471.hs @@ -0,0 +1,13 @@ +{-# OPTIONS_GHC -Wno-inline-rule-shadowing #-} +-- Otherwise we get stuff about (+) may inline, which is +-- true enough, but not the point of this test + +module T22471 where + +foo :: (forall a. [a] -> Int) -> Int +foo len = len [1,2,3] + len "abc" + +{-# RULES "foo" forall (f :: forall a. [a] -> Int). + foo (\xs -> 1 + f xs) = 2 + foo f #-} + + diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 583acbc47d..1c169d7d6e 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -437,6 +437,7 @@ test('T22097', [grep_errmsg(r'case.*wgoEven') ], multimod_compile, ['T22097', '- test('T13873', [ grep_errmsg(r'SPEC') ], compile, ['-O -ddump-rules']) test('T22357', normal, compile, ['-O']) +test('T22471', normal, compile, ['-O']) test('T22347', normal, compile, ['-O -fno-full-laziness']) test('T22347a', normal, compile, ['-O2 -fno-full-laziness']) |