summaryrefslogtreecommitdiff
path: root/testdata/loopIssue.lc
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/loopIssue.lc')
-rw-r--r--testdata/loopIssue.lc27
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 #-}
3import Internals 3import Internals
4 4
5data Inf = Inf Inf 5data Inf = Inf Inf
6 6
7--xx = yy
8
9inf = Inf inf 7inf = Inf inf
10 8
11x = 1 9main' = case inf of
10 Inf _ -> True
11
12 12
13{-
14inf2 = inf 13inf2 = inf
15 14
16main = case inf2 of 15
17 Inf _ -> True
18 16
19data List a = Nil | Cons a (List a) 17data List a = Nil | Cons a (List a)
20 18
21fromInt x = x :: Int
22 19
23(-) = primSubInt 20(-) = primSubInt
24 21
@@ -31,21 +28,11 @@ primes = repeatT
31 28
32 29
33 30
34fix
35
36inf = Inf inf
37
38inf' = \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
47main = -- case 3: [] of x : xs -> x 34main = -- case 3: [] of x : xs -> x
48 primes !! 0 -- TODO: 100 35 primes !! 20 -- TODO: 100
49-} 36
50 37
51 38