[project @ 2001-08-22 11:45:06 by sewardj]
[ghc-hetmet.git] / ghc / tests / simplCore / should_run / simplrun001.hs
1 -- !!! Test filter fusion
2
3 -- In GHC 4.06, the filterFB rule was back to front, which
4 -- made this program hit the "error foo" case instead of
5 -- working fine.
6
7
8 module Main where
9
10 main :: IO ()
11 main = print (length (filter (not . foo)
12                              (filter (const False) [Nothing])))
13   where foo (Just x) = x
14         foo _        = error "foo"