summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-05-14 00:55:19 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-05-14 00:55:19 +0200
commit8d404ca664c695eae97cc9b088f2c98833999ea0 (patch)
tree37711b72e1e465242f278a7bf6925e734b02e6bc /testdata
parent2cb670b19f41f2cd0dcbda0b697e80d5a3e6b922 (diff)
reach the 3000th prime
Diffstat (limited to 'testdata')
-rw-r--r--testdata/primes.lc2
-rw-r--r--testdata/primes.out10
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
53main = primes !! 130 53main = 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 @@
1main :: Int 1main :: Int
2main = 739 2main = 27457
3------------ desugared source code 3------------ desugared source code
4infixr 0 $ 4infixr 0 $
5 5
@@ -98,7 +98,7 @@ primes
98 (fromInt 0 == c)) 98 (fromInt 0 == c))
99 b 99 b
100 100
101main = _lhs main (_rhs (primes !! fromInt 130)) 101main = _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
156id = \a b -> _rhs b 156id = \a b -> _rhs b
157 157
158main :: Int 158main :: Int
159main = _rhs 739 159main = _rhs 27457
160 160
161map :: forall a b . (a -> b) -> [a] -> [b] 161map :: forall a b . (a -> b) -> [a] -> [b]
162map = \a b c -> _rhs (foldr (\d e -> c d : e) []) 162map = \a b c -> _rhs (foldr (\d e -> c d : e) [])
@@ -538,11 +538,11 @@ takeWhile
538 [Int] 538 [Int]
53953:8-53:17 53953:8-53:17
540 Int -> Int 540 Int -> Int
54153:8-53:21 54153:8-53:22
542 Int 542 Int
54353:15-53:17 54353:15-53:17
544 forall a . [a] -> Int -> a 544 forall a . [a] -> Int -> a
54553:18-53:21 54553:18-53:22
546 _b 546 _b
547------------ warnings 547------------ warnings
548Uncovered pattern(s) at ./testdata/primes.lc:50:8: 548Uncovered pattern(s) at ./testdata/primes.lc:50:8: