summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_run/SeqRule.hs
blob: 536ecb59c6bbc6099cbdd83110bed6410ebfb284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

-- This test checks that the magic treatment of RULES 
-- for 'seq' works right. 
--
-- See Note [User-defined RULES for seq] in GHC.Types.Id.Make for more details

module Main where

{-# NOINLINE f #-}
f x = not x

{-# RULES 
     "f/seq" forall n.  seq (f n) = const True
 #-}

main = print (seq (f True) False)