Commit 73fad543 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Add test for the new magic treatment of 'seq' in RULES

parent 3dd7d37f
-- This test checks that the magic treatment of RULES
-- for 'seq' works right.
--
-- See Note [RULES for seq] in MkId for more details
module Main where
{-# NOINLINE f #-}
f x = not x
{-# RULES
"f/seq" forall n e. seq (f n) e = True
#-}
main = print (seq (f True) False)
......@@ -27,3 +27,5 @@ test('simplrun010', composes([extra_run_opts('24 16 8'),
# the output of -ddump-rules can be compared
test('T2486', normal, compile, [''])
test('T2756', normal, compile_and_run, [''])
test('SeqRule', only_ways(['optc','optasm']), compile_and_run, [''])
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