summaryrefslogtreecommitdiff
path: root/testsuite/tests/perf/space_leaks/T2762.hs
blob: 76ab04501c94fc4eaaace91ac6d94599692eaa2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

module Main (main) where

import T2762A

main :: IO ()
main = do
          let content1 = concat (replicate 1000000 "1x") ++ "0"
          let i1 = fst $ input content1
          view i1

          let content2 = concat (replicate 1000001 "1y") ++ "0"
          let i2 = fst $ input content2
          view i2

view :: [Char] -> IO ()
view [] = return ()
view (i : is) = i `seq` view is