Merge branch 'master' into atomics
[ghc.git] / testsuite / tests / simplCore / should_compile / simpl016.hs
1 -- Test for trac ticket #1287; ghc 6.6 and 6.6.1 panicked on this
2
3 module ShouldCompile where
4
5 {-# SPECIALIZE delta' :: Num b => Int -> Int -> b -> b -> b #-}
6 delta' :: Eq a => a -> a -> b -> b -> b
7 delta' x y e f = if (x==y) then f else e
8
9 {-# SPECIALIZE delta :: Num b => Int -> Int -> b #-}
10 delta :: (Eq a, Num b) => a -> a -> b
11 delta x y = delta' x y 0 1
12