diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-11 20:57:07 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-12 00:50:34 +0200 |
commit | e4725c07ee3e7e3fc010df418d16f37c39b0af0f (patch) | |
tree | cb10e1d1203eed875955097311ccbe0943564226 /testdata/language-features/recursion | |
parent | 95e006bf5afa8d3473e3fe4401f4c9316186a428 (diff) |
mutual function definitions
Diffstat (limited to 'testdata/language-features/recursion')
-rw-r--r-- | testdata/language-features/recursion/mutualConst.lc | 9 | ||||
-rw-r--r-- | testdata/language-features/recursion/mutualConst.out | 195 | ||||
-rw-r--r-- | testdata/language-features/recursion/mutualFunc.lc | 11 | ||||
-rw-r--r-- | testdata/language-features/recursion/mutualFunc.out | 107 | ||||
-rw-r--r-- | testdata/language-features/recursion/mutualRec.lc | 10 | ||||
-rw-r--r-- | testdata/language-features/recursion/mutualRec.out | 140 | ||||
-rw-r--r-- | testdata/language-features/recursion/simplerec01.out | 17 |
7 files changed, 473 insertions, 16 deletions
diff --git a/testdata/language-features/recursion/mutualConst.lc b/testdata/language-features/recursion/mutualConst.lc index c7f83f18..526a14a7 100644 --- a/testdata/language-features/recursion/mutualConst.lc +++ b/testdata/language-features/recursion/mutualConst.lc | |||
@@ -1,9 +1,14 @@ | |||
1 | {-# LANGUAGE NoImplicitPrelude #-} | ||
2 | import Internals | ||
1 | 3 | ||
2 | xy = (\x y -> ((1 :: Int): y, 1: x)) (fst xy) (snd xy) | 4 | fst (x, y) = x |
5 | snd (x, y) = y | ||
6 | |||
7 | xy = (\x y -> (False: y, True: x)) (fst xy) (snd xy) | ||
3 | 8 | ||
4 | (x, y) = xy | 9 | (x, y) = xy |
5 | 10 | ||
6 | main = case x of | 11 | main = case x of |
7 | 1: 1: 1: _ -> True | 12 | False: True: False: _ -> True |
8 | 13 | ||
9 | 14 | ||
diff --git a/testdata/language-features/recursion/mutualConst.out b/testdata/language-features/recursion/mutualConst.out index 4791ed55..34d37bc7 100644 --- a/testdata/language-features/recursion/mutualConst.out +++ b/testdata/language-features/recursion/mutualConst.out | |||
@@ -1 +1,194 @@ | |||
1 | True \ No newline at end of file | 1 | main :: Bool |
2 | main = True | ||
3 | ------------ desugared source code | ||
4 | fst | ||
5 | = _lhs | ||
6 | fst | ||
7 | \(a :: _) -> hlistConsCase | ||
8 | _ | ||
9 | (\(b :: _) (c :: _) -> hlistConsCase | ||
10 | _ | ||
11 | (\(_ :: _) (d :: _) -> hlistNilCase _ (_rhs b) d) | ||
12 | c) | ||
13 | a | ||
14 | |||
15 | snd | ||
16 | = _lhs | ||
17 | snd | ||
18 | \(a :: _) -> hlistConsCase | ||
19 | _ | ||
20 | (\(_ :: _) (b :: _) -> hlistConsCase | ||
21 | _ | ||
22 | (\(c :: _) (d :: _) -> hlistNilCase _ (_rhs c) d) | ||
23 | b) | ||
24 | a | ||
25 | |||
26 | xy | ||
27 | = primFix | ||
28 | \(a :: _) -> _lhs | ||
29 | xy | ||
30 | (_rhs ((\(b :: _) (c :: _) -> (False : c, True : b)) (fst a) (snd a))) | ||
31 | |||
32 | _y_x = _lhs _y_x (_rhs xy) | ||
33 | |||
34 | y | ||
35 | = _lhs | ||
36 | y | ||
37 | (_rhs | ||
38 | ((\(a :: _) -> hlistConsCase | ||
39 | _ | ||
40 | (\(_ :: _) (b :: _) -> hlistConsCase | ||
41 | _ | ||
42 | (\(c :: _) (d :: _) -> hlistNilCase _ c d) | ||
43 | b) | ||
44 | a) | ||
45 | _y_x)) | ||
46 | |||
47 | x | ||
48 | = _lhs | ||
49 | x | ||
50 | (_rhs | ||
51 | ((\(a :: _) -> hlistConsCase | ||
52 | _ | ||
53 | (\(b :: _) (c :: _) -> hlistConsCase | ||
54 | _ | ||
55 | (\(_ :: _) (d :: _) -> hlistNilCase _ b d) | ||
56 | c) | ||
57 | a) | ||
58 | _y_x)) | ||
59 | |||
60 | main | ||
61 | = _lhs | ||
62 | main | ||
63 | (_rhs | ||
64 | ((\(a :: _) -> case'List | ||
65 | (\(_ :: _) -> _) | ||
66 | undefined | ||
67 | (\(b :: _) (c :: _) -> case'Bool | ||
68 | (\(_ :: _) -> _) | ||
69 | (case'List | ||
70 | (\(_ :: _) -> _) | ||
71 | undefined | ||
72 | (\(d :: _) (e :: _) -> case'Bool | ||
73 | (\(_ :: _) -> _) | ||
74 | undefined | ||
75 | (case'List | ||
76 | (\(_ :: _) -> _) | ||
77 | undefined | ||
78 | (\(f :: _) (_ :: _) -> case'Bool (\(_ :: _) -> _) True undefined f) | ||
79 | e) | ||
80 | d) | ||
81 | c) | ||
82 | undefined | ||
83 | b) | ||
84 | a) | ||
85 | x)) | ||
86 | ------------ core code | ||
87 | _y_x :: ([Bool], [Bool]) | ||
88 | _y_x = _rhs (False : snd xy, True : fst xy) | ||
89 | |||
90 | fst :: forall a b . (a, b) -> a | ||
91 | fst | ||
92 | = \a b c -> hlistConsCase | ||
93 | a | ||
94 | [b] | ||
95 | a | ||
96 | (\d e -> hlistConsCase b [] a (\_ f -> hlistNilCase a (_rhs d) f) e) | ||
97 | c | ||
98 | |||
99 | main :: Bool | ||
100 | main = _rhs True | ||
101 | |||
102 | snd :: forall a b . (a, b) -> b | ||
103 | snd | ||
104 | = \a b c -> hlistConsCase | ||
105 | a | ||
106 | [b] | ||
107 | b | ||
108 | (\_ d -> hlistConsCase b [] b (\e f -> hlistNilCase b (_rhs e) f) d) | ||
109 | c | ||
110 | |||
111 | x :: [Bool] | ||
112 | x = _rhs (False : snd xy) | ||
113 | |||
114 | xy :: ([Bool], [Bool]) | ||
115 | xy = primFix _ \a -> _rhs (False : snd a, True : fst a) | ||
116 | |||
117 | y :: [Bool] | ||
118 | y = _rhs (True : fst xy) | ||
119 | ------------ tooltips | ||
120 | testdata/language-features/recursion/mutualConst.lc 4:1-4:4 | ||
121 | forall a b . (a, b) -> a | ||
122 | testdata/language-features/recursion/mutualConst.lc 4:14-4:15 | ||
123 | _k | _h | _d | ||
124 | testdata/language-features/recursion/mutualConst.lc 5:1-5:4 | ||
125 | forall a b . (a, b) -> b | ||
126 | testdata/language-features/recursion/mutualConst.lc 5:14-5:15 | ||
127 | _f | _c | _c | ||
128 | testdata/language-features/recursion/mutualConst.lc 7:1-7:3 | ||
129 | ([Bool], [Bool]) | ||
130 | testdata/language-features/recursion/mutualConst.lc 7:6-7:44 | ||
131 | [Bool] -> ([Bool], [Bool]) | ||
132 | testdata/language-features/recursion/mutualConst.lc 7:6-7:53 | ||
133 | ([Bool], [Bool]) | ||
134 | testdata/language-features/recursion/mutualConst.lc 7:15-7:34 | ||
135 | ([Bool], [Bool]) | ||
136 | testdata/language-features/recursion/mutualConst.lc 7:16-7:21 | ||
137 | Bool | ||
138 | testdata/language-features/recursion/mutualConst.lc 7:16-7:22 | ||
139 | [Bool] -> [Bool] | ||
140 | testdata/language-features/recursion/mutualConst.lc 7:16-7:24 | ||
141 | [Bool] | ||
142 | testdata/language-features/recursion/mutualConst.lc 7:21-7:22 | ||
143 | forall a . a -> [a] -> [a] | ||
144 | testdata/language-features/recursion/mutualConst.lc 7:23-7:24 | ||
145 | _c | ||
146 | testdata/language-features/recursion/mutualConst.lc 7:26-7:30 | ||
147 | Bool | ||
148 | testdata/language-features/recursion/mutualConst.lc 7:26-7:31 | ||
149 | [Bool] -> [Bool] | ||
150 | testdata/language-features/recursion/mutualConst.lc 7:26-7:33 | ||
151 | [Bool] | (([Bool])) | ||
152 | testdata/language-features/recursion/mutualConst.lc 7:30-7:31 | ||
153 | forall a . a -> [a] -> [a] | ||
154 | testdata/language-features/recursion/mutualConst.lc 7:32-7:33 | ||
155 | _e | ||
156 | testdata/language-features/recursion/mutualConst.lc 7:37-7:40 | ||
157 | forall a b . (a, b) -> a | ||
158 | testdata/language-features/recursion/mutualConst.lc 7:37-7:43 | ||
159 | _b | ||
160 | testdata/language-features/recursion/mutualConst.lc 7:41-7:43 | ||
161 | _d | ||
162 | testdata/language-features/recursion/mutualConst.lc 7:46-7:49 | ||
163 | forall a b . (a, b) -> b | ||
164 | testdata/language-features/recursion/mutualConst.lc 7:46-7:52 | ||
165 | [Bool] | ||
166 | testdata/language-features/recursion/mutualConst.lc 7:50-7:52 | ||
167 | ([Bool], [Bool]) | ||
168 | testdata/language-features/recursion/mutualConst.lc 9:2-9:3 | ||
169 | _k | _h | _d | [Bool] | ||
170 | testdata/language-features/recursion/mutualConst.lc 9:2-9:6 | ||
171 | ([Bool], [Bool]) | ([Bool], [Bool]) | ([Bool], [Bool]) | ||
172 | testdata/language-features/recursion/mutualConst.lc 9:5-9:6 | ||
173 | _f | _c | _c | [Bool] | ||
174 | testdata/language-features/recursion/mutualConst.lc 9:10-9:12 | ||
175 | ([Bool], [Bool]) | ||
176 | testdata/language-features/recursion/mutualConst.lc 11:1-11:5 | ||
177 | Bool | ||
178 | testdata/language-features/recursion/mutualConst.lc 11:8-12:34 | ||
179 | Bool | ||
180 | testdata/language-features/recursion/mutualConst.lc 11:13-11:14 | ||
181 | [Bool] | ||
182 | testdata/language-features/recursion/mutualConst.lc 12:30-12:34 | ||
183 | Bool | Bool | Bool | Bool | Bool | Bool | ||
184 | ------------ warnings | ||
185 | Uncovered pattern(s) at testdata/language-features/recursion/mutualConst.lc:11:13: | ||
186 | main = case x of | ||
187 | ^ | ||
188 | Missing case(s): | ||
189 | [] | ||
190 | [False] | ||
191 | (False : False : _) | ||
192 | [False, True] | ||
193 | (False : True : True : _) | ||
194 | (True : _) \ No newline at end of file | ||
diff --git a/testdata/language-features/recursion/mutualFunc.lc b/testdata/language-features/recursion/mutualFunc.lc new file mode 100644 index 00000000..2f3a524e --- /dev/null +++ b/testdata/language-features/recursion/mutualFunc.lc | |||
@@ -0,0 +1,11 @@ | |||
1 | {-# LANGUAGE NoImplicitPrelude #-} | ||
2 | import Internals | ||
3 | |||
4 | f True = g False | ||
5 | f False = g True | ||
6 | |||
7 | g True = True | ||
8 | g x = f x | ||
9 | |||
10 | main = f True | ||
11 | |||
diff --git a/testdata/language-features/recursion/mutualFunc.out b/testdata/language-features/recursion/mutualFunc.out new file mode 100644 index 00000000..6dd3f158 --- /dev/null +++ b/testdata/language-features/recursion/mutualFunc.out | |||
@@ -0,0 +1,107 @@ | |||
1 | main :: Bool | ||
2 | main = True | ||
3 | ------------ desugared source code | ||
4 | _g_f | ||
5 | = primFix | ||
6 | \(a :: _) -> let | ||
7 | b = a; | ||
8 | c | ||
9 | = (\(e :: _) -> hlistConsCase | ||
10 | _ | ||
11 | (\(_ :: _) (f :: _) -> hlistConsCase | ||
12 | _ | ||
13 | (\(g :: _) (h :: _) -> hlistNilCase _ g h) | ||
14 | f) | ||
15 | e) | ||
16 | b; | ||
17 | d | ||
18 | = (\(i :: _) -> hlistConsCase | ||
19 | _ | ||
20 | (\(j :: _) (k :: _) -> hlistConsCase | ||
21 | _ | ||
22 | (\(_ :: _) (l :: _) -> hlistNilCase _ j l) | ||
23 | k) | ||
24 | i) | ||
25 | b | ||
26 | in (_lhs g \(m :: _) -> case'Bool (\(_ :: _) -> _) (_rhs (c m)) (_rhs True) m | ||
27 | , _lhs | ||
28 | f | ||
29 | \(n :: _) -> case'Bool (\(_ :: _) -> _) (_rhs (d True)) (_rhs (d False)) n) | ||
30 | |||
31 | _f_g = _g_f | ||
32 | |||
33 | f | ||
34 | = (\(a :: _) -> hlistConsCase | ||
35 | _ | ||
36 | (\(_ :: _) (b :: _) -> hlistConsCase | ||
37 | _ | ||
38 | (\(c :: _) (d :: _) -> hlistNilCase _ c d) | ||
39 | b) | ||
40 | a) | ||
41 | _f_g | ||
42 | |||
43 | g | ||
44 | = (\(a :: _) -> hlistConsCase | ||
45 | _ | ||
46 | (\(b :: _) (c :: _) -> hlistConsCase | ||
47 | _ | ||
48 | (\(_ :: _) (d :: _) -> hlistNilCase _ b d) | ||
49 | c) | ||
50 | a) | ||
51 | _f_g | ||
52 | |||
53 | main = _lhs main (_rhs (f True)) | ||
54 | ------------ core code | ||
55 | _f_g :: (Bool -> Bool, Bool -> Bool) | ||
56 | _f_g = primFix _ \a -> <<1st constructor of 'HList>> | ||
57 | |||
58 | _g_f :: (Bool -> Bool, Bool -> Bool) | ||
59 | _g_f = primFix _ \a -> <<1st constructor of 'HList>> | ||
60 | |||
61 | f :: Bool -> Bool | ||
62 | f = \a -> case'Bool (\_ -> 'Bool) (_rhs True) (_rhs True) a | ||
63 | |||
64 | g :: Bool -> Bool | ||
65 | g = \a -> case'Bool (\_ -> 'Bool) (_rhs (f a)) (_rhs True) a | ||
66 | |||
67 | main :: Bool | ||
68 | main = _rhs True | ||
69 | ------------ tooltips | ||
70 | testdata/language-features/recursion/mutualFunc.lc 4:1-4:2 | ||
71 | _f | _c | _c | _f | _c | _c | Bool -> Bool | ||
72 | testdata/language-features/recursion/mutualFunc.lc 4:1-7:2 | ||
73 | _b | _e | (_e, _d) | (Bool -> Bool, Bool -> Bool) | (Bool -> Bool | ||
74 | , Bool -> Bool) | (Bool -> Bool, Bool -> Bool) | (Bool -> Bool | ||
75 | , Bool -> Bool) | (Bool -> Bool, Bool -> Bool) | ||
76 | testdata/language-features/recursion/mutualFunc.lc 4:10-4:11 | ||
77 | Bool -> _a | ||
78 | testdata/language-features/recursion/mutualFunc.lc 4:10-4:17 | ||
79 | _a | ||
80 | testdata/language-features/recursion/mutualFunc.lc 4:10-5:17 | ||
81 | Bool -> _a | ((Bool -> _a)) | ||
82 | testdata/language-features/recursion/mutualFunc.lc 4:10-8:10 | ||
83 | (Bool -> Bool, Bool -> _a) | ||
84 | testdata/language-features/recursion/mutualFunc.lc 4:12-4:17 | ||
85 | Bool | ||
86 | testdata/language-features/recursion/mutualFunc.lc 5:11-5:12 | ||
87 | _i | ||
88 | testdata/language-features/recursion/mutualFunc.lc 5:13-5:17 | ||
89 | Bool | ||
90 | testdata/language-features/recursion/mutualFunc.lc 7:1-7:2 | ||
91 | _k | _h | _d | _k | _h | _d | Bool -> Bool | ||
92 | testdata/language-features/recursion/mutualFunc.lc 7:10-7:14 | ||
93 | Bool | ||
94 | testdata/language-features/recursion/mutualFunc.lc 7:10-8:10 | ||
95 | Bool -> Bool | ||
96 | testdata/language-features/recursion/mutualFunc.lc 8:7-8:8 | ||
97 | _h | ||
98 | testdata/language-features/recursion/mutualFunc.lc 8:9-8:10 | ||
99 | _f | ||
100 | testdata/language-features/recursion/mutualFunc.lc 10:1-10:5 | ||
101 | Bool | ||
102 | testdata/language-features/recursion/mutualFunc.lc 10:8-10:9 | ||
103 | Bool -> Bool | ||
104 | testdata/language-features/recursion/mutualFunc.lc 10:8-10:14 | ||
105 | Bool | ||
106 | testdata/language-features/recursion/mutualFunc.lc 10:10-10:14 | ||
107 | Bool \ No newline at end of file | ||
diff --git a/testdata/language-features/recursion/mutualRec.lc b/testdata/language-features/recursion/mutualRec.lc index c9ae6135..9a9422de 100644 --- a/testdata/language-features/recursion/mutualRec.lc +++ b/testdata/language-features/recursion/mutualRec.lc | |||
@@ -1,8 +1,10 @@ | |||
1 | {-# LANGUAGE NoImplicitPrelude #-} | ||
2 | import Internals | ||
1 | 3 | ||
2 | x = 2: y | 4 | x = False: y |
3 | y = 1: x | 5 | y = True: x |
4 | 6 | ||
5 | main = case (x :: [Int]) of | 7 | main = case x of |
6 | 2: 1: 2: _ -> True | 8 | False: True: False: _ -> True |
7 | 9 | ||
8 | 10 | ||
diff --git a/testdata/language-features/recursion/mutualRec.out b/testdata/language-features/recursion/mutualRec.out index 4791ed55..885bd1ba 100644 --- a/testdata/language-features/recursion/mutualRec.out +++ b/testdata/language-features/recursion/mutualRec.out | |||
@@ -1 +1,139 @@ | |||
1 | True \ No newline at end of file | 1 | main :: Bool |
2 | main = True | ||
3 | ------------ desugared source code | ||
4 | _y_x | ||
5 | = primFix | ||
6 | \(a :: _) -> let | ||
7 | b = a; | ||
8 | c | ||
9 | = (\(e :: _) -> hlistConsCase | ||
10 | _ | ||
11 | (\(_ :: _) (f :: _) -> hlistConsCase | ||
12 | _ | ||
13 | (\(g :: _) (h :: _) -> hlistNilCase _ g h) | ||
14 | f) | ||
15 | e) | ||
16 | b; | ||
17 | d | ||
18 | = (\(i :: _) -> hlistConsCase | ||
19 | _ | ||
20 | (\(j :: _) (k :: _) -> hlistConsCase | ||
21 | _ | ||
22 | (\(_ :: _) (l :: _) -> hlistNilCase _ j l) | ||
23 | k) | ||
24 | i) | ||
25 | b | ||
26 | in (_lhs y (_rhs (True : c)), _lhs x (_rhs (False : d))) | ||
27 | |||
28 | _x_y = _y_x | ||
29 | |||
30 | x | ||
31 | = (\(a :: _) -> hlistConsCase | ||
32 | _ | ||
33 | (\(_ :: _) (b :: _) -> hlistConsCase | ||
34 | _ | ||
35 | (\(c :: _) (d :: _) -> hlistNilCase _ c d) | ||
36 | b) | ||
37 | a) | ||
38 | _x_y | ||
39 | |||
40 | y | ||
41 | = (\(a :: _) -> hlistConsCase | ||
42 | _ | ||
43 | (\(b :: _) (c :: _) -> hlistConsCase | ||
44 | _ | ||
45 | (\(_ :: _) (d :: _) -> hlistNilCase _ b d) | ||
46 | c) | ||
47 | a) | ||
48 | _x_y | ||
49 | |||
50 | main | ||
51 | = _lhs | ||
52 | main | ||
53 | (_rhs | ||
54 | ((\(a :: _) -> case'List | ||
55 | (\(_ :: _) -> _) | ||
56 | undefined | ||
57 | (\(b :: _) (c :: _) -> case'Bool | ||
58 | (\(_ :: _) -> _) | ||
59 | (case'List | ||
60 | (\(_ :: _) -> _) | ||
61 | undefined | ||
62 | (\(d :: _) (e :: _) -> case'Bool | ||
63 | (\(_ :: _) -> _) | ||
64 | undefined | ||
65 | (case'List | ||
66 | (\(_ :: _) -> _) | ||
67 | undefined | ||
68 | (\(f :: _) (_ :: _) -> case'Bool (\(_ :: _) -> _) True undefined f) | ||
69 | e) | ||
70 | d) | ||
71 | c) | ||
72 | undefined | ||
73 | b) | ||
74 | a) | ||
75 | x)) | ||
76 | ------------ core code | ||
77 | _x_y :: ([Bool], [Bool]) | ||
78 | _x_y = primFix _ \a -> <<1st constructor of 'HList>> | ||
79 | |||
80 | _y_x :: ([Bool], [Bool]) | ||
81 | _y_x = primFix _ \a -> <<1st constructor of 'HList>> | ||
82 | |||
83 | main :: Bool | ||
84 | main = _rhs True | ||
85 | |||
86 | x :: [Bool] | ||
87 | x = _rhs (False : y) | ||
88 | |||
89 | y :: [Bool] | ||
90 | y = _rhs (True : x) | ||
91 | ------------ tooltips | ||
92 | testdata/language-features/recursion/mutualRec.lc 4:1-4:2 | ||
93 | _f | _c | _c | _f | _c | _c | [Bool] | ||
94 | testdata/language-features/recursion/mutualRec.lc 4:1-5:2 | ||
95 | _b | _e | (_e, _d) | ([Bool], [Bool]) | ([Bool], [Bool]) | ([Bool] | ||
96 | , [Bool]) | ([Bool], [Bool]) | ([Bool], [Bool]) | ||
97 | testdata/language-features/recursion/mutualRec.lc 4:5-4:10 | ||
98 | Bool | ||
99 | testdata/language-features/recursion/mutualRec.lc 4:5-4:11 | ||
100 | [Bool] -> [Bool] | ||
101 | testdata/language-features/recursion/mutualRec.lc 4:5-4:13 | ||
102 | [Bool] | (([Bool])) | ||
103 | testdata/language-features/recursion/mutualRec.lc 4:5-5:12 | ||
104 | ([Bool], [Bool]) | ||
105 | testdata/language-features/recursion/mutualRec.lc 4:10-4:11 | ||
106 | forall a . a -> [a] -> [a] | ||
107 | testdata/language-features/recursion/mutualRec.lc 4:12-4:13 | ||
108 | _e | ||
109 | testdata/language-features/recursion/mutualRec.lc 5:1-5:2 | ||
110 | _k | _h | _d | _k | _h | _d | [Bool] | ||
111 | testdata/language-features/recursion/mutualRec.lc 5:5-5:9 | ||
112 | Bool | ||
113 | testdata/language-features/recursion/mutualRec.lc 5:5-5:10 | ||
114 | [Bool] -> [Bool] | ||
115 | testdata/language-features/recursion/mutualRec.lc 5:5-5:12 | ||
116 | [Bool] | ||
117 | testdata/language-features/recursion/mutualRec.lc 5:9-5:10 | ||
118 | forall a . a -> [a] -> [a] | ||
119 | testdata/language-features/recursion/mutualRec.lc 5:11-5:12 | ||
120 | _d | ||
121 | testdata/language-features/recursion/mutualRec.lc 7:1-7:5 | ||
122 | Bool | ||
123 | testdata/language-features/recursion/mutualRec.lc 7:8-8:34 | ||
124 | Bool | ||
125 | testdata/language-features/recursion/mutualRec.lc 7:13-7:14 | ||
126 | [Bool] | ||
127 | testdata/language-features/recursion/mutualRec.lc 8:30-8:34 | ||
128 | Bool | Bool | Bool | Bool | Bool | Bool | ||
129 | ------------ warnings | ||
130 | Uncovered pattern(s) at testdata/language-features/recursion/mutualRec.lc:7:13: | ||
131 | main = case x of | ||
132 | ^ | ||
133 | Missing case(s): | ||
134 | [] | ||
135 | [False] | ||
136 | (False : False : _) | ||
137 | [False, True] | ||
138 | (False : True : True : _) | ||
139 | (True : _) \ No newline at end of file | ||
diff --git a/testdata/language-features/recursion/simplerec01.out b/testdata/language-features/recursion/simplerec01.out index 736caa77..823d544e 100644 --- a/testdata/language-features/recursion/simplerec01.out +++ b/testdata/language-features/recursion/simplerec01.out | |||
@@ -1,18 +1,19 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | fun | 3 | fun |
4 | = _lhs | 4 | = primFix |
5 | fun | 5 | \(a :: _) -> _lhs |
6 | \(a :: _) -> case'Bool | 6 | fun |
7 | (\(_ :: _) -> _) | 7 | \(b :: _) -> case'Bool |
8 | (_rhs (fun (fromInt 0))) | 8 | (\(_ :: _) -> _) |
9 | (_rhs 'a') | 9 | (_rhs (a (fromInt 0))) |
10 | (fromInt 0 == a) | 10 | (_rhs 'a') |
11 | (fromInt 0 == b) | ||
11 | ------------ core code | 12 | ------------ core code |
12 | fun :: forall a . (Num a, Eq a, Num a) => a -> Char | 13 | fun :: forall a . (Num a, Eq a, Num a) => a -> Char |
13 | fun | 14 | fun |
14 | = \a b c d -> primFix | 15 | = \a b c d -> primFix |
15 | (a -> 'Char) | 16 | _ |
16 | \e f -> case'Bool | 17 | \e f -> case'Bool |
17 | (\_ -> 'Char) | 18 | (\_ -> 'Char) |
18 | (_rhs (e (fromInt a b 0))) | 19 | (_rhs (e (fromInt a b 0))) |