blob: 9c492d087f75536046ace8bf4182f7f5f33ea743 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
{-# LANGUAGE NoImplicitPrelude #-}
-- {-# LANGUAGE TraceTypeCheck #-}
import Internals
data Inf = Inf Inf
inf = Inf inf
main' = case inf of
Inf _ -> True
inf2 = inf
data List a = Nil | Cons a (List a)
(-) = primSubInt
repeat n = (n :: Bool): repeat n
repeatT = True: repeatT
--primes :: [Bool]
primes = repeatT
(x: _) !! 0 = x
(_ : xs) !! n = xs !! (n-1)
main = -- case 3: [] of x : xs -> x
primes !! 20 -- TODO: 100
|