diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-08-29 15:37:16 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-08-29 17:16:55 +0100 |
commit | 393506269315bca66aae91517b75e0a003470c84 (patch) | |
tree | fad0cf8d6e233043d853a567cc2752a122dbab13 /testsuite | |
parent | e5f766c392c8c1cb329e1409102b5655c3c253c9 (diff) | |
download | haskell-393506269315bca66aae91517b75e0a003470c84.tar.gz |
Finally! Test Trac #6056
Diffstat (limited to 'testsuite')
4 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T6056.hs b/testsuite/tests/simplCore/should_compile/T6056.hs new file mode 100644 index 0000000000..e24631d234 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T6056.hs @@ -0,0 +1,8 @@ +module T6056 where +import T6056a + +foo1 :: Int -> (Maybe Int, [Int]) +foo1 x = smallerAndRest x [x] + +foo2 :: Integer -> (Maybe Integer, [Integer]) +foo2 x = smallerAndRest x [x] diff --git a/testsuite/tests/simplCore/should_compile/T6056.stderr b/testsuite/tests/simplCore/should_compile/T6056.stderr new file mode 100644 index 0000000000..10226d82b7 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T6056.stderr @@ -0,0 +1,20 @@ +Rule fired: foldr/nil +Rule fired: foldr/nil +Rule fired: + SPEC/main@main:T6056 T6056a.$wsmallerAndRest @ GHC.Integer.Type.Integer +Rule fired: + SPEC/main@main:T6056 T6056a.$wsmallerAndRest @ GHC.Types.Int +Rule fired: Class op < +Rule fired: Class op < +Rule fired: + SPEC/main@main:T6056 T6056a.$wsmallerAndRest @ GHC.Integer.Type.Integer +Rule fired: + SPEC/main@main:T6056 T6056a.$wsmallerAndRest @ GHC.Integer.Type.Integer +Rule fired: + SPEC/main@main:T6056 T6056a.$wsmallerAndRest @ GHC.Types.Int +Rule fired: + SPEC/main@main:T6056 T6056a.$wsmallerAndRest @ GHC.Types.Int +Rule fired: + SPEC/main@main:T6056 T6056a.$wsmallerAndRest @ GHC.Types.Int +Rule fired: + SPEC/main@main:T6056 T6056a.$wsmallerAndRest @ GHC.Integer.Type.Integer diff --git a/testsuite/tests/simplCore/should_compile/T6056a.hs b/testsuite/tests/simplCore/should_compile/T6056a.hs new file mode 100644 index 0000000000..c83f74f965 --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/T6056a.hs @@ -0,0 +1,8 @@ +module T6056a where + +smallerAndRest :: Ord a => a -> [a] -> (Maybe a, [a]) +smallerAndRest x [] = (Nothing, []) +smallerAndRest x (y:ys) | y < x = (Just y, ys) + | otherwise = smallerAndRest x ys + +{-# INLINABLE smallerAndRest #-} diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index d8518f6264..88d10228f9 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -205,3 +205,4 @@ test('T8832', test('T8848', only_ways(['optasm']), compile, ['-ddump-rule-firings -dsuppress-uniques']) test('T8848a', only_ways(['optasm']), compile, ['-ddump-rules']) test('T8331', only_ways(['optasm']), compile, ['-ddump-rules']) +test('T6056', only_ways(['optasm']), multimod_compile, ['T6056', '-v0 -ddump-rule-firings']) |