summaryrefslogtreecommitdiff
path: root/testsuite/tests/arityanal/should_compile/T18937.hs
blob: c7db70af02ced39f30cbc07cedcf9cfdcab0522a (plain)
1
2
3
4
5
6
7
8
{-# OPTIONS_GHC -O2 -fforce-recomp #-}

module T18937 where

f :: [Int] -> Int -> Int
f []     = id
f (x:xs) = let y = sum [0..x]
           in \z -> f xs (y + z)