Commit 39350626 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Finally! Test Trac #6056

parent e5f766c3
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]
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
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 #-}
......@@ -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'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment