diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-14 00:55:19 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-14 00:55:19 +0200 |
commit | 8d404ca664c695eae97cc9b088f2c98833999ea0 (patch) | |
tree | 37711b72e1e465242f278a7bf6925e734b02e6bc /testdata | |
parent | 2cb670b19f41f2cd0dcbda0b697e80d5a3e6b922 (diff) |
reach the 3000th prime
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/primes.lc | 2 | ||||
-rw-r--r-- | testdata/primes.out | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/testdata/primes.lc b/testdata/primes.lc index 612941e1..268d7e7b 100644 --- a/testdata/primes.lc +++ b/testdata/primes.lc | |||
@@ -50,5 +50,5 @@ primes = 2:3: filter (\n -> and $ map (\p -> n `mod` p /= 0) (takeWhile (\x -> x | |||
50 | (x: _) !! 0 = x | 50 | (x: _) !! 0 = x |
51 | (_ : xs) !! n = xs !! (n-1) | 51 | (_ : xs) !! n = xs !! (n-1) |
52 | 52 | ||
53 | main = primes !! 130 | 53 | main = primes !! 3000 |
54 | 54 | ||
diff --git a/testdata/primes.out b/testdata/primes.out index aa9f5a22..f538ab96 100644 --- a/testdata/primes.out +++ b/testdata/primes.out | |||
@@ -1,5 +1,5 @@ | |||
1 | main :: Int | 1 | main :: Int |
2 | main = 739 | 2 | main = 27457 |
3 | ------------ desugared source code | 3 | ------------ desugared source code |
4 | infixr 0 $ | 4 | infixr 0 $ |
5 | 5 | ||
@@ -98,7 +98,7 @@ primes | |||
98 | (fromInt 0 == c)) | 98 | (fromInt 0 == c)) |
99 | b | 99 | b |
100 | 100 | ||
101 | main = _lhs main (_rhs (primes !! fromInt 130)) | 101 | main = _lhs main (_rhs (primes !! fromInt 3000)) |
102 | ------------ core code | 102 | ------------ core code |
103 | !! :: forall a . [a] -> Int -> a | 103 | !! :: forall a . [a] -> Int -> a |
104 | !! | 104 | !! |
@@ -156,7 +156,7 @@ id :: forall a . a -> a | |||
156 | id = \a b -> _rhs b | 156 | id = \a b -> _rhs b |
157 | 157 | ||
158 | main :: Int | 158 | main :: Int |
159 | main = _rhs 739 | 159 | main = _rhs 27457 |
160 | 160 | ||
161 | map :: forall a b . (a -> b) -> [a] -> [b] | 161 | map :: forall a b . (a -> b) -> [a] -> [b] |
162 | map = \a b c -> _rhs (foldr (\d e -> c d : e) []) | 162 | map = \a b c -> _rhs (foldr (\d e -> c d : e) []) |
@@ -538,11 +538,11 @@ takeWhile | |||
538 | [Int] | 538 | [Int] |
539 | 53:8-53:17 | 539 | 53:8-53:17 |
540 | Int -> Int | 540 | Int -> Int |
541 | 53:8-53:21 | 541 | 53:8-53:22 |
542 | Int | 542 | Int |
543 | 53:15-53:17 | 543 | 53:15-53:17 |
544 | forall a . [a] -> Int -> a | 544 | forall a . [a] -> Int -> a |
545 | 53:18-53:21 | 545 | 53:18-53:22 |
546 | _b | 546 | _b |
547 | ------------ warnings | 547 | ------------ warnings |
548 | Uncovered pattern(s) at ./testdata/primes.lc:50:8: | 548 | Uncovered pattern(s) at ./testdata/primes.lc:50:8: |