diff options
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/simpl016.hs')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/simpl016.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/simplCore/should_compile/simpl016.hs b/testsuite/tests/simplCore/should_compile/simpl016.hs new file mode 100644 index 0000000000..6ba088e6fa --- /dev/null +++ b/testsuite/tests/simplCore/should_compile/simpl016.hs @@ -0,0 +1,12 @@ +-- Test for trac ticket #1287; ghc 6.6 and 6.6.1 panicked on this + +module ShouldCompile where + +{-# SPECIALIZE delta' :: Num b => Int -> Int -> b -> b -> b #-} +delta' :: Eq a => a -> a -> b -> b -> b +delta' x y e f = if (x==y) then f else e + +{-# SPECIALIZE delta :: Num b => Int -> Int -> b #-} +delta :: (Eq a, Num b) => a -> a -> b +delta x y = delta' x y 0 1 + |