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