Commit 4535fa26 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #12996

parent 27f79255
{-# OPTIONS_GHC -fno-full-laziness #-}
module Main where
import Control.Monad (unless)
import Data.Time.Clock
import System.IO
data AppState = AppState [Int]
cycleState :: [Int] -> [Int]
cycleState w = filter (check w) w
check :: [Int] -> Int -> Bool
check world pos = pos `elem` world
initialSet :: [Int]
initialSet = [1]
main :: IO ()
main = appLoop 24 (AppState initialSet)
appLoop :: Int -> AppState -> IO ()
appLoop n s
| n == 0 = return ()
| otherwise = do let AppState state = s
print state
appLoop (n-1) $ AppState (cycleState state)
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
[1]
......@@ -445,3 +445,10 @@ test('T9339',
only_ways(['normal'])],
compile_and_run,
['-O2'])
test('T12996',
[stats_num_field('bytes allocated',
[ (wordsize(64), 76776, 5) ]),
only_ways(['normal'])],
compile_and_run,
['-O2'])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment