mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-15 01:25:05 +03:00
Delete folding002 test.
It tested for tailcalls that have been removed.
This commit is contained in:
parent
5269289f13
commit
c308d09f4a
@ -1,2 +0,0 @@
|
||||
5000050000
|
||||
5000050000
|
@ -1,25 +0,0 @@
|
||||
import Data.Vect
|
||||
|
||||
-- perform a very large foldr to test tail recursion
|
||||
addAll : (Foldable t, Num a) => t a -> a
|
||||
addAll = foldr (+) 0
|
||||
|
||||
n : Integer
|
||||
n = 100000
|
||||
|
||||
numbersList : List Integer
|
||||
numbersList = numbersList' n []
|
||||
where
|
||||
numbersList' : Integer -> List Integer -> List Integer
|
||||
numbersList' 0 xs = xs
|
||||
numbersList' k xs = numbersList' (k - 1) (fromInteger k :: xs)
|
||||
|
||||
numbersVect : Vect (length numbersList) Integer
|
||||
numbersVect = fromList numbersList
|
||||
|
||||
main : IO ()
|
||||
main = do
|
||||
putStrLn . show . addAll $ numbersVect
|
||||
putStrLn . show . addAll $ numbersList
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
idris $@ folding002.idr -o folding002
|
||||
./folding002
|
||||
rm -f folding002 *.ibc
|
Loading…
Reference in New Issue
Block a user