blob: d7f83bf9fa848f01bce46333c3b34c6d86748caf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-- Tests for a bug in the handling of cost-centre stacks in the
-- runtime, where we lose the current cost-centre stack when
-- evaluating a function.
{-# NOINLINE f #-}
f :: Int -> Int
f = g -- here we should remember the stack under which g was evaluated
{-# NOINLINE g #-}
g :: Int -> Int
g x = x + 1
main = return $! f 3
|