lookupBindGroupOcc: recommend names in the same namespace (#17593)
[ghc.git] / testsuite / tests / perf / should_run / T4321.hs
1
2 -- In 6.13 this stack overflowed
3
4 module Main (main) where
5
6 main :: IO ()
7 main = let n = 1000000
8 in print $ integrate n (1 / fromIntegral n)
9
10 integrate :: Int -> Double -> Double
11 integrate n h = h * (sum (map area [1..n]))
12 where area :: Int -> Double
13 area i = let x = h * (fromIntegral i - 0.5)
14 in 4 / (1 + x*x)
15