diff --git a/tests/all.T b/tests/all.T index 9814b76dd898ee8c269c3594aa9062160044b781..2dd8f0ba860343758bcb3455933996e4f359b634 100644 --- a/tests/all.T +++ b/tests/all.T @@ -1,3 +1,4 @@ test('T2120', normal, compile_and_run, ['']) +test('largeArray', normal, compile_and_run, ['']) diff --git a/tests/largeArray.hs b/tests/largeArray.hs new file mode 100644 index 0000000000000000000000000000000000000000..64414c10d898247691a51a4a08f13862f40e33cb --- /dev/null +++ b/tests/largeArray.hs @@ -0,0 +1,13 @@ +import Data.Array + +main :: IO () +main = print (((!1).inc.inc.inc.inc.inc.inc.inc.inc.inc.inc) a) + +size :: Int +size = 60 + +a :: Array Int Integer +a = listArray (1,size) [1..] + +inc :: Array Int Integer -> Array Int Integer +inc a = accum (+) a [(i,1) | i <- [1..size]] diff --git a/tests/largeArray.stdout b/tests/largeArray.stdout new file mode 100644 index 0000000000000000000000000000000000000000..b4de3947675361a7770d29b8982c407b0ec6b2a0 --- /dev/null +++ b/tests/largeArray.stdout @@ -0,0 +1 @@ +11