summaryrefslogtreecommitdiff
path: root/testsuite/tests/eyeball/state-hack.hs
blob: 439bf7820235cab2b6fcfe43e88b0707578d34f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)