Ints12.curry 313 Bytes
Newer Older
1
2
-- Testing the equivalence of non-terminating operations:

Michael Hanus's avatar
Michael Hanus committed
3
import Data.Nat
4
5
6
7
8
9
10
11
12
import Test.Prop

-- Two different infinite lists:
ints1 :: Int -> [Int]
ints1 n = n : ints1 (n+1)

ints2 :: Int -> [Int]
ints2 n = n : ints2 (n+2)

13
-- This property will be falsified by the 47th test:
14
ints1_equiv_ints2 = ints1 <=> ints2