diff options
Diffstat (limited to 'testdata/loopIssue.lc')
-rw-r--r-- | testdata/loopIssue.lc | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/testdata/loopIssue.lc b/testdata/loopIssue.lc index 741b84f7..9c492d08 100644 --- a/testdata/loopIssue.lc +++ b/testdata/loopIssue.lc | |||
@@ -1,24 +1,21 @@ | |||
1 | {-# LANGUAGE NoImplicitPrelude #-} | 1 | {-# LANGUAGE NoImplicitPrelude #-} |
2 | {-# LANGUAGE TraceTypeCheck #-} | 2 | -- {-# LANGUAGE TraceTypeCheck #-} |
3 | import Internals | 3 | import Internals |
4 | 4 | ||
5 | data Inf = Inf Inf | 5 | data Inf = Inf Inf |
6 | 6 | ||
7 | --xx = yy | ||
8 | |||
9 | inf = Inf inf | 7 | inf = Inf inf |
10 | 8 | ||
11 | x = 1 | 9 | main' = case inf of |
10 | Inf _ -> True | ||
11 | |||
12 | 12 | ||
13 | {- | ||
14 | inf2 = inf | 13 | inf2 = inf |
15 | 14 | ||
16 | main = case inf2 of | 15 | |
17 | Inf _ -> True | ||
18 | 16 | ||
19 | data List a = Nil | Cons a (List a) | 17 | data List a = Nil | Cons a (List a) |
20 | 18 | ||
21 | fromInt x = x :: Int | ||
22 | 19 | ||
23 | (-) = primSubInt | 20 | (-) = primSubInt |
24 | 21 | ||
@@ -31,21 +28,11 @@ primes = repeatT | |||
31 | 28 | ||
32 | 29 | ||
33 | 30 | ||
34 | fix | ||
35 | |||
36 | inf = Inf inf | ||
37 | |||
38 | inf' = \fix -> fix (\inf -> unlabel (Inf inf)) | ||
39 | |||
40 | |||
41 | -} | ||
42 | |||
43 | {- | ||
44 | (x: _) !! 0 = x | 31 | (x: _) !! 0 = x |
45 | (_ : xs) !! n = xs !! (n-1) | 32 | (_ : xs) !! n = xs !! (n-1) |
46 | 33 | ||
47 | main = -- case 3: [] of x : xs -> x | 34 | main = -- case 3: [] of x : xs -> x |
48 | primes !! 0 -- TODO: 100 | 35 | primes !! 20 -- TODO: 100 |
49 | -} | 36 | |
50 | 37 | ||
51 | 38 | ||