mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-09-21 14:09:30 +03:00
ce414b82a6
This test will fail if laziness doesn't prevent infinite recursion in the executor. It's implemented using `expect` instead of `timeout` in the hope that it will make life easier for non-GNU systems.
13 lines
284 B
Idris
13 lines
284 B
Idris
module LazyExec
|
|
|
|
-- The regression that this tests for is broken laziness in the executor.
|
|
|
|
covering
|
|
countdown : Int -> Lazy (List Int)
|
|
countdown n = if n > 0
|
|
then (n :: countdown (n-1))
|
|
else []
|
|
|
|
go : IO ()
|
|
go = putStrLn $ show (Force (countdown 3))
|