summaryrefslogtreecommitdiff
path: root/testsuite/tests/stranal/should_compile/T21128.hs
blob: 02991433f23618734760800f5e486b5a2abdb569 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module T21128 where

import T21128a

{- This test originally had some unnecessary reboxing of y
in the hot path of $wtheresCrud.  That reboxing should
not happen. -}

theresCrud :: Int -> Int -> Int
theresCrud x y = go x
  where
    go 0 = index 0 y 0
    go 1 = index x y 1
    go n = go (n-1)
{-# NOINLINE theresCrud #-}