Merge branch 'master' into atomics
[ghc.git] / testsuite / tests / simplCore / should_compile / T7360.hs
1 -- Both these functions should successfully simplify
2 -- using the combine-identical-alterantives optimisation
3
4 module T7360 where
5
6 data Foo = Foo1 | Foo2 | Foo3 !Int
7
8 fun1 :: Foo -> ()
9 {-# NOINLINE fun1 #-}
10 fun1 x = case x of
11 Foo1 -> ()
12 Foo2 -> ()
13 Foo3 {} -> ()
14
15 fun2 x = (fun1 Foo1, -- Keep -ddump-simpl output
16 -- in a predicatable order
17 case x of
18 [] -> length x
19 (_:_) -> length x)