summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T3717.hs
blob: eab0540f134e86d9b2e76c47b19764d7f3b8b47c (plain)
1
2
3
4
5
6
7
8
9
10
-- This tests whether a supurious `seq` is eliminated

-- The test output is -ddump-simpl with uniques suppressed,
-- so it may wobble a bit and require updating

module T3717 where

foo :: Int -> Int
foo 0 = 0
foo n = (if n < 5 then 1 else 2) `seq` foo (n-1)