blob: 4b6e576f34f1097a54fc6497462f1638409505ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{-# LANGUAGE MagicHash #-}
import System.Mem
import GHC.Base
main = do
let list = concatMap buildThunk [0..10000]
length list `seq` performGC
print $ last list
buildThunk :: Int -> [Int]
buildThunk (I# k) = [f k]
f :: Int# -> Int
f x = I# x
|