diff options
Diffstat (limited to 'testsuite/tests/eyeball/state-hack.hs')
-rw-r--r-- | testsuite/tests/eyeball/state-hack.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/eyeball/state-hack.hs b/testsuite/tests/eyeball/state-hack.hs new file mode 100644 index 0000000000..439bf78202 --- /dev/null +++ b/testsuite/tests/eyeball/state-hack.hs @@ -0,0 +1,19 @@ +-- The question here is whether f gets eta-expanded +-- (assuming the state hack). It should, but +-- didn't in GHC 6.10 + +module Foo where + +import GHC.Base + +{-# NOINLINE z #-} +z :: State# a -> Bool +z s = True + +{-# NOINLINE k #-} +k :: Int -> State# a -> Bool +k y s = False + + +f [] = z +f (x:xs) = k (length xs) |