Avoid ./configure failure on NetBSD
[ghc.git] / testsuite / tests / perf / should_run / UniqLoop.hs
1 {-# LANGUAGE BangPatterns #-}
2
3 module Main where
4
5 import UniqSupply
6 import Unique
7
8 -- Generate a lot of uniques
9 main = do
10 us <- mkSplitUniqSupply 'v'
11 seq (churn us 10000000) (return ())
12
13 churn :: UniqSupply -> Int -> Int
14 churn !us 0 = getKey $ uniqFromSupply us
15 churn us n =
16 let (!x,!us') = takeUniqFromSupply us
17 in churn us' (n-1)