diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-05-10 16:32:23 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-05-10 16:32:23 +0200 |
commit | 6ecef8f577432ffcaee07f09b2a73d4ea5eb5de2 (patch) | |
tree | 82ed1f4401c3cf2cd4910e5f2e62d0d3a8ac6904 /testdata/Internals.out | |
parent | e061e1a91afc552fd7c3d7e5f7efb59746cc446f (diff) |
explicit lhs marks, first step
Diffstat (limited to 'testdata/Internals.out')
-rw-r--r-- | testdata/Internals.out | 210 |
1 files changed, 118 insertions, 92 deletions
diff --git a/testdata/Internals.out b/testdata/Internals.out index a66b70d3..a04281f0 100644 --- a/testdata/Internals.out +++ b/testdata/Internals.out | |||
@@ -1,8 +1,8 @@ | |||
1 | main is not found | 1 | main is not found |
2 | ------------ desugared source code | 2 | ------------ desugared source code |
3 | typeAnn = \(a :: _) -> _rhs a | 3 | typeAnn = _lhs typeAnn \(a :: _) -> _rhs a |
4 | 4 | ||
5 | parens = \(a :: _) -> _rhs a | 5 | parens = _lhs parens \(a :: _) -> _rhs a |
6 | 6 | ||
7 | undefined :: forall a . a | 7 | undefined :: forall a . a |
8 | 8 | ||
@@ -33,7 +33,7 @@ parEval :: forall (a :: _) -> a -> a -> a | |||
33 | 33 | ||
34 | match'Type :: forall (a :: Type -> Type) -> a Type -> forall b -> a b -> a b | 34 | match'Type :: forall (a :: Type -> Type) -> a Type -> forall b -> a b -> a b |
35 | 35 | ||
36 | 'EqCTt = _rhs ('EqCT (_ :: _)) | 36 | 'EqCTt = _lhs 'EqCTt (_rhs ('EqCT (_ :: _))) |
37 | 37 | ||
38 | t2C :: Unit -> Unit -> Unit | 38 | t2C :: Unit -> Unit -> Unit |
39 | 39 | ||
@@ -96,171 +96,197 @@ primRound :: Float -> Int | |||
96 | 96 | ||
97 | primIfThenElse :: forall (a :: _) . Bool -> a -> a -> a | 97 | primIfThenElse :: forall (a :: _) . Bool -> a -> a -> a |
98 | primIfThenElse | 98 | primIfThenElse |
99 | = \(a :: _) (b :: _) (c :: _) -> case'Bool (\(_ :: _) -> _) (_rhs c) (_rhs b) a | 99 | = _lhs |
100 | primIfThenElse | ||
101 | \(a :: _) (b :: _) (c :: _) -> case'Bool (\(_ :: _) -> _) (_rhs c) (_rhs b) a | ||
100 | 102 | ||
101 | isEQ | 103 | isEQ |
102 | = \(a :: _) -> case'Ordering | 104 | = _lhs |
103 | (\(_ :: _) -> _) | 105 | isEQ |
104 | (_rhs False) | 106 | \(a :: _) -> case'Ordering |
105 | (_rhs True) | 107 | (\(_ :: _) -> _) |
106 | (_rhs False) | 108 | (_rhs False) |
107 | a | 109 | (_rhs True) |
110 | (_rhs False) | ||
111 | a | ||
108 | 112 | ||
109 | 'Num :: Type -> Constraint | 113 | 'Num :: Type -> Constraint |
110 | 'Num | 114 | 'Num |
111 | = \(a :: _) -> match'Int | 115 | = _lhs |
112 | (\(_ :: _) -> _) | 116 | 'Num |
113 | (_rhs 'CUnit) | 117 | \(a :: _) -> match'Int |
114 | a | ||
115 | (match'Word | ||
116 | (\(_ :: _) -> _) | 118 | (\(_ :: _) -> _) |
117 | (_rhs 'CUnit) | 119 | (_rhs 'CUnit) |
118 | a | 120 | a |
119 | (match'Float | 121 | (match'Word |
120 | (\(_ :: _) -> _) | 122 | (\(_ :: _) -> _) |
121 | (_rhs 'CUnit) | 123 | (_rhs 'CUnit) |
122 | a | 124 | a |
123 | (match'Nat | 125 | (match'Float |
124 | (\(_ :: _) -> _) | 126 | (\(_ :: _) -> _) |
125 | (_rhs 'CUnit) | 127 | (_rhs 'CUnit) |
126 | a | 128 | a |
127 | (_rhs ('CEmpty "no instance of 'Num on ???"))))) | 129 | (match'Nat |
130 | (\(_ :: _) -> _) | ||
131 | (_rhs 'CUnit) | ||
132 | a | ||
133 | (_rhs ('CEmpty "no instance of 'Num on ???"))))) | ||
128 | 134 | ||
129 | fromInt :: forall a . Num a => Int -> a | 135 | fromInt :: forall a . Num a => Int -> a |
130 | fromInt | 136 | fromInt |
131 | = \ @a @(_ :: _) -> match'Int | 137 | = _lhs |
132 | (\(_ :: _) -> _) | 138 | fromInt |
133 | (_rhs let b = _rhs \(c :: _) -> c in b) | 139 | \ @a @(_ :: _) -> match'Int |
134 | a | ||
135 | (match'Word | ||
136 | (\(_ :: _) -> _) | 140 | (\(_ :: _) -> _) |
137 | (_rhs let d = _rhs primIntToWord in d) | 141 | (_rhs let b = _lhs fromInt (_rhs \(c :: _) -> c) in b) |
138 | a | 142 | a |
139 | (match'Float | 143 | (match'Word |
140 | (\(_ :: _) -> _) | 144 | (\(_ :: _) -> _) |
141 | (_rhs let e = _rhs primIntToFloat in e) | 145 | (_rhs let d = _lhs fromInt (_rhs primIntToWord) in d) |
142 | a | 146 | a |
143 | (match'Nat | 147 | (match'Float |
144 | (\(_ :: _) -> _) | 148 | (\(_ :: _) -> _) |
145 | (_rhs let f = _rhs primIntToNat in f) | 149 | (_rhs let e = _lhs fromInt (_rhs primIntToFloat) in e) |
146 | a | 150 | a |
147 | (_rhs undefined)))) | 151 | (match'Nat |
152 | (\(_ :: _) -> _) | ||
153 | (_rhs let f = _lhs fromInt (_rhs primIntToNat) in f) | ||
154 | a | ||
155 | (_rhs undefined)))) | ||
148 | 156 | ||
149 | compare :: forall a . Num a => a -> a -> Ordering | 157 | compare :: forall a . Num a => a -> a -> Ordering |
150 | compare | 158 | compare |
151 | = \ @a @(_ :: _) -> match'Int | 159 | = _lhs |
152 | (\(_ :: _) -> _) | 160 | compare |
153 | (_rhs let b = _rhs primCompareInt in b) | 161 | \ @a @(_ :: _) -> match'Int |
154 | a | ||
155 | (match'Word | ||
156 | (\(_ :: _) -> _) | 162 | (\(_ :: _) -> _) |
157 | (_rhs let c = _rhs primCompareWord in c) | 163 | (_rhs let b = _lhs compare (_rhs primCompareInt) in b) |
158 | a | 164 | a |
159 | (match'Float | 165 | (match'Word |
160 | (\(_ :: _) -> _) | 166 | (\(_ :: _) -> _) |
161 | (_rhs let d = _rhs primCompareFloat in d) | 167 | (_rhs let c = _lhs compare (_rhs primCompareWord) in c) |
162 | a | 168 | a |
163 | (match'Nat | 169 | (match'Float |
164 | (\(_ :: _) -> _) | 170 | (\(_ :: _) -> _) |
165 | (_rhs let e = _rhs undefined in e) | 171 | (_rhs let d = _lhs compare (_rhs primCompareFloat) in d) |
166 | a | 172 | a |
167 | (_rhs undefined)))) | 173 | (match'Nat |
174 | (\(_ :: _) -> _) | ||
175 | (_rhs let e = _lhs compare (_rhs undefined) in e) | ||
176 | a | ||
177 | (_rhs undefined)))) | ||
168 | 178 | ||
169 | negate :: forall a . Num a => a -> a | 179 | negate :: forall a . Num a => a -> a |
170 | negate | 180 | negate |
171 | = \ @a @(_ :: _) -> match'Int | 181 | = _lhs |
172 | (\(_ :: _) -> _) | 182 | negate |
173 | (_rhs let b = _rhs primNegateInt in b) | 183 | \ @a @(_ :: _) -> match'Int |
174 | a | ||
175 | (match'Word | ||
176 | (\(_ :: _) -> _) | 184 | (\(_ :: _) -> _) |
177 | (_rhs let c = _rhs primNegateWord in c) | 185 | (_rhs let b = _lhs negate (_rhs primNegateInt) in b) |
178 | a | 186 | a |
179 | (match'Float | 187 | (match'Word |
180 | (\(_ :: _) -> _) | 188 | (\(_ :: _) -> _) |
181 | (_rhs let d = _rhs primNegateFloat in d) | 189 | (_rhs let c = _lhs negate (_rhs primNegateWord) in c) |
182 | a | 190 | a |
183 | (match'Nat | 191 | (match'Float |
184 | (\(_ :: _) -> _) | 192 | (\(_ :: _) -> _) |
185 | (_rhs let e = _rhs undefined in e) | 193 | (_rhs let d = _lhs negate (_rhs primNegateFloat) in d) |
186 | a | 194 | a |
187 | (_rhs undefined)))) | 195 | (match'Nat |
196 | (\(_ :: _) -> _) | ||
197 | (_rhs let e = _lhs negate (_rhs undefined) in e) | ||
198 | a | ||
199 | (_rhs undefined)))) | ||
188 | 200 | ||
189 | 'Eq :: Type -> Constraint | 201 | 'Eq :: Type -> Constraint |
190 | 'Eq | 202 | 'Eq |
191 | = \(a :: _) -> match'String | 203 | = _lhs |
192 | (\(_ :: _) -> _) | 204 | 'Eq |
193 | (_rhs 'CUnit) | 205 | \(a :: _) -> match'String |
194 | a | ||
195 | (match'Char | ||
196 | (\(_ :: _) -> _) | 206 | (\(_ :: _) -> _) |
197 | (_rhs 'CUnit) | 207 | (_rhs 'CUnit) |
198 | a | 208 | a |
199 | (match'Int | 209 | (match'Char |
200 | (\(_ :: _) -> _) | 210 | (\(_ :: _) -> _) |
201 | (_rhs 'CUnit) | 211 | (_rhs 'CUnit) |
202 | a | 212 | a |
203 | (match'Float | 213 | (match'Int |
204 | (\(_ :: _) -> _) | 214 | (\(_ :: _) -> _) |
205 | (_rhs 'CUnit) | 215 | (_rhs 'CUnit) |
206 | a | 216 | a |
207 | (match'Bool | 217 | (match'Float |
208 | (\(_ :: _) -> _) | 218 | (\(_ :: _) -> _) |
209 | (_rhs 'CUnit) | 219 | (_rhs 'CUnit) |
210 | a | 220 | a |
211 | (match'Nat | 221 | (match'Bool |
212 | (\(_ :: _) -> _) | 222 | (\(_ :: _) -> _) |
213 | (_rhs 'CUnit) | 223 | (_rhs 'CUnit) |
214 | a | 224 | a |
215 | (_rhs ('CEmpty "no instance of 'Eq on ???"))))))) | 225 | (match'Nat |
226 | (\(_ :: _) -> _) | ||
227 | (_rhs 'CUnit) | ||
228 | a | ||
229 | (_rhs ('CEmpty "no instance of 'Eq on ???"))))))) | ||
216 | 230 | ||
217 | (==) :: forall a . Eq a => a -> a -> Bool | 231 | (==) :: forall a . Eq a => a -> a -> Bool |
218 | (==) | 232 | (==) |
219 | = \ @a @(_ :: _) -> match'String | 233 | = _lhs |
220 | (\(_ :: _) -> _) | 234 | (==) |
221 | (_rhs let b = \(c :: _) (d :: _) -> _rhs (isEQ (primCompareString c d)) in b) | 235 | \ @a @(_ :: _) -> match'String |
222 | a | ||
223 | (match'Char | ||
224 | (\(_ :: _) -> _) | 236 | (\(_ :: _) -> _) |
225 | (_rhs let e = \(f :: _) (g :: _) -> _rhs (isEQ (primCompareChar f g)) in e) | 237 | (_rhs |
238 | let | ||
239 | b = _lhs (==) \(c :: _) (d :: _) -> _rhs (isEQ (primCompareString c d)) | ||
240 | in b) | ||
226 | a | 241 | a |
227 | (match'Int | 242 | (match'Char |
228 | (\(_ :: _) -> _) | 243 | (\(_ :: _) -> _) |
229 | (_rhs let h = \(i :: _) (j :: _) -> _rhs (isEQ (primCompareInt i j)) in h) | 244 | (_rhs |
245 | let e = _lhs (==) \(f :: _) (g :: _) -> _rhs (isEQ (primCompareChar f g)) in e) | ||
230 | a | 246 | a |
231 | (match'Float | 247 | (match'Int |
232 | (\(_ :: _) -> _) | 248 | (\(_ :: _) -> _) |
233 | (_rhs let k = \(l :: _) (m :: _) -> _rhs (isEQ (primCompareFloat l m)) in k) | 249 | (_rhs |
250 | let h = _lhs (==) \(i :: _) (j :: _) -> _rhs (isEQ (primCompareInt i j)) in h) | ||
234 | a | 251 | a |
235 | (match'Bool | 252 | (match'Float |
236 | (\(_ :: _) -> _) | 253 | (\(_ :: _) -> _) |
237 | (_rhs | 254 | (_rhs |
238 | let | 255 | let k = _lhs (==) \(l :: _) (m :: _) -> _rhs (isEQ (primCompareFloat l m)) in k) |
239 | n | ||
240 | = \(o :: _) (p :: _) -> case'Bool | ||
241 | (\(_ :: _) -> _) | ||
242 | (case'Bool (\(_ :: _) -> _) (_rhs True) (_rhs False) p) | ||
243 | (case'Bool (\(_ :: _) -> _) (_rhs False) (_rhs True) p) | ||
244 | o | ||
245 | in n) | ||
246 | a | 256 | a |
247 | (match'Nat | 257 | (match'Bool |
248 | (\(_ :: _) -> _) | 258 | (\(_ :: _) -> _) |
249 | (_rhs | 259 | (_rhs |
250 | let | 260 | let |
251 | q | 261 | n |
252 | = \(r :: _) (s :: _) -> case'Nat | 262 | = _lhs |
253 | (\(_ :: _) -> _) | 263 | (==) |
254 | (case'Nat (\(_ :: _) -> _) (_rhs True) (\(_ :: _) -> _rhs False) s) | 264 | \(o :: _) (p :: _) -> case'Bool |
255 | (\(t :: _) -> case'Nat | ||
256 | (\(_ :: _) -> _) | 265 | (\(_ :: _) -> _) |
257 | (_rhs False) | 266 | (case'Bool (\(_ :: _) -> _) (_rhs True) (_rhs False) p) |
258 | (\(u :: _) -> _rhs (t == u)) | 267 | (case'Bool (\(_ :: _) -> _) (_rhs False) (_rhs True) p) |
259 | s) | 268 | o |
260 | r | 269 | in n) |
261 | in q) | ||
262 | a | 270 | a |
263 | (_rhs undefined)))))) | 271 | (match'Nat |
272 | (\(_ :: _) -> _) | ||
273 | (_rhs | ||
274 | let | ||
275 | q | ||
276 | = _lhs | ||
277 | (==) | ||
278 | \(r :: _) (s :: _) -> case'Nat | ||
279 | (\(_ :: _) -> _) | ||
280 | (case'Nat (\(_ :: _) -> _) (_rhs True) (\(_ :: _) -> _rhs False) s) | ||
281 | (\(t :: _) -> case'Nat | ||
282 | (\(_ :: _) -> _) | ||
283 | (_rhs False) | ||
284 | (\(u :: _) -> _rhs (t == u)) | ||
285 | s) | ||
286 | r | ||
287 | in q) | ||
288 | a | ||
289 | (_rhs undefined)))))) | ||
264 | 290 | ||
265 | infix 4 == | 291 | infix 4 == |
266 | 292 | ||