diff options
37 files changed, 286 insertions, 340 deletions
diff --git a/src/LambdaCube/Compiler/Patterns.hs b/src/LambdaCube/Compiler/Patterns.hs index 3056b132..1483450a 100644 --- a/src/LambdaCube/Compiler/Patterns.hs +++ b/src/LambdaCube/Compiler/Patterns.hs | |||
@@ -300,7 +300,7 @@ compileGuardTree ulend lend si vt = fmap (\e -> foldr (uncurry SLam) e vt) . run | |||
300 | | (cn, n) <- cns ] | 300 | | (cn, n) <- cns ] |
301 | return $ | 301 | return $ |
302 | foldl SAppV | 302 | foldl SAppV |
303 | (SGlobal (SIName mempty casename) `SAppV` iterateN (1 + inum) SLamV (Wildcard (Wildcard SType))) | 303 | (SGlobal (SIName mempty casename) `SAppV` iterateN (1 + inum) SLamV (Wildcard SType)) |
304 | cf | 304 | cf |
305 | `SAppV` f | 305 | `SAppV` f |
306 | Right n -> do | 306 | Right n -> do |
diff --git a/testdata/Builtins.out b/testdata/Builtins.out index 351b6558..469a2a39 100644 --- a/testdata/Builtins.out +++ b/testdata/Builtins.out | |||
@@ -6,7 +6,7 @@ data VecS (_ :: Type) :: Nat -> Type where | |||
6 | V4 :: forall c . c -> c -> c -> c -> VecS c (fromInt 4) | 6 | V4 :: forall c . c -> c -> c -> c -> VecS c (fromInt 4) |
7 | mapVec | 7 | mapVec |
8 | = (\(a :: _) (b :: _) -> case'VecS | 8 | = (\(a :: _) (b :: _) -> case'VecS |
9 | (\_ _ -> _ :: _) | 9 | (\_ _ -> _) |
10 | (\(c :: _) (d :: _) -> _rhs (V2 (a c) (a d))) | 10 | (\(c :: _) (d :: _) -> _rhs (V2 (a c) (a d))) |
11 | (\(e :: _) (f :: _) (g :: _) -> _rhs (V3 (a e) (a f) (a g))) | 11 | (\(e :: _) (f :: _) (g :: _) -> _rhs (V3 (a e) (a f) (a g))) |
12 | (\(h :: _) (i :: _) (j :: _) (k :: _) -> _rhs (V4 (a h) (a i) (a j) (a k))) | 12 | (\(h :: _) (i :: _) (j :: _) (k :: _) -> _rhs (V4 (a h) (a i) (a j) (a k))) |
@@ -15,10 +15,10 @@ mapVec | |||
15 | 'Vec = (\(a :: _) (b :: _) -> _rhs ('VecS b a)) :: Nat -> Type -> Type | 15 | 'Vec = (\(a :: _) (b :: _) -> _rhs ('VecS b a)) :: Nat -> Type -> Type |
16 | 'VecScalar | 16 | 'VecScalar |
17 | = (\(a :: _) (b :: _) -> case'Nat | 17 | = (\(a :: _) (b :: _) -> case'Nat |
18 | (\_ -> _ :: _) | 18 | (\_ -> _) |
19 | undefined | 19 | undefined |
20 | (\(c :: _) -> case'Nat | 20 | (\(c :: _) -> case'Nat |
21 | (\_ -> _ :: _) | 21 | (\_ -> _) |
22 | (_rhs b) | 22 | (_rhs b) |
23 | (\(d :: _) -> _rhs ('Vec (Succ (Succ d)) b)) | 23 | (\(d :: _) -> _rhs ('Vec (Succ (Succ d)) b)) |
24 | c) | 24 | c) |
@@ -109,19 +109,19 @@ data Mat :: Nat -> Nat -> Type -> Type where | |||
109 | (\(b :: _) (c :: _) -> match'Float | 109 | (\(b :: _) (c :: _) -> match'Float |
110 | (\_ -> _) | 110 | (\_ -> _) |
111 | (case'Nat | 111 | (case'Nat |
112 | (\_ -> _ :: _) | 112 | (\_ -> _) |
113 | (_rhs ('Empty "no instance of 'Component on ???")) | 113 | (_rhs ('Empty "no instance of 'Component on ???")) |
114 | (\(d :: _) -> case'Nat | 114 | (\(d :: _) -> case'Nat |
115 | (\_ -> _ :: _) | 115 | (\_ -> _) |
116 | (_rhs ('Empty "no instance of 'Component on ???")) | 116 | (_rhs ('Empty "no instance of 'Component on ???")) |
117 | (\(e :: _) -> case'Nat | 117 | (\(e :: _) -> case'Nat |
118 | (\_ -> _ :: _) | 118 | (\_ -> _) |
119 | (_rhs 'Unit) | 119 | (_rhs 'Unit) |
120 | (\(f :: _) -> case'Nat | 120 | (\(f :: _) -> case'Nat |
121 | (\_ -> _ :: _) | 121 | (\_ -> _) |
122 | (_rhs 'Unit) | 122 | (_rhs 'Unit) |
123 | (\(g :: _) -> case'Nat | 123 | (\(g :: _) -> case'Nat |
124 | (\_ -> _ :: _) | 124 | (\_ -> _) |
125 | (_rhs 'Unit) | 125 | (_rhs 'Unit) |
126 | (\_ -> _rhs ('Empty "no instance of 'Component on ???")) | 126 | (\_ -> _rhs ('Empty "no instance of 'Component on ???")) |
127 | g) | 127 | g) |
@@ -133,19 +133,19 @@ data Mat :: Nat -> Nat -> Type -> Type where | |||
133 | (match'Bool | 133 | (match'Bool |
134 | (\_ -> _) | 134 | (\_ -> _) |
135 | (case'Nat | 135 | (case'Nat |
136 | (\_ -> _ :: _) | 136 | (\_ -> _) |
137 | (_rhs ('Empty "no instance of 'Component on ???")) | 137 | (_rhs ('Empty "no instance of 'Component on ???")) |
138 | (\(h :: _) -> case'Nat | 138 | (\(h :: _) -> case'Nat |
139 | (\_ -> _ :: _) | 139 | (\_ -> _) |
140 | (_rhs ('Empty "no instance of 'Component on ???")) | 140 | (_rhs ('Empty "no instance of 'Component on ???")) |
141 | (\(i :: _) -> case'Nat | 141 | (\(i :: _) -> case'Nat |
142 | (\_ -> _ :: _) | 142 | (\_ -> _) |
143 | (_rhs 'Unit) | 143 | (_rhs 'Unit) |
144 | (\(j :: _) -> case'Nat | 144 | (\(j :: _) -> case'Nat |
145 | (\_ -> _ :: _) | 145 | (\_ -> _) |
146 | (_rhs 'Unit) | 146 | (_rhs 'Unit) |
147 | (\(k :: _) -> case'Nat | 147 | (\(k :: _) -> case'Nat |
148 | (\_ -> _ :: _) | 148 | (\_ -> _) |
149 | (_rhs 'Unit) | 149 | (_rhs 'Unit) |
150 | (\_ -> _rhs ('Empty "no instance of 'Component on ???")) | 150 | (\_ -> _rhs ('Empty "no instance of 'Component on ???")) |
151 | k) | 151 | k) |
@@ -180,19 +180,19 @@ zero | |||
180 | (\(e :: _) (f :: _) -> match'Float | 180 | (\(e :: _) (f :: _) -> match'Float |
181 | (\_ -> _) | 181 | (\_ -> _) |
182 | (case'Nat | 182 | (case'Nat |
183 | (\_ -> _ :: _) | 183 | (\_ -> _) |
184 | (_rhs undefined) | 184 | (_rhs undefined) |
185 | (\(g :: _) -> case'Nat | 185 | (\(g :: _) -> case'Nat |
186 | (\_ -> _ :: _) | 186 | (\_ -> _) |
187 | (_rhs undefined) | 187 | (_rhs undefined) |
188 | (\(h :: _) -> case'Nat | 188 | (\(h :: _) -> case'Nat |
189 | (\_ -> _ :: _) | 189 | (\_ -> _) |
190 | (_rhs \(i := _rhs (V2 0.0 0.0)) -> i) | 190 | (_rhs \(i := _rhs (V2 0.0 0.0)) -> i) |
191 | (\(j :: _) -> case'Nat | 191 | (\(j :: _) -> case'Nat |
192 | (\_ -> _ :: _) | 192 | (\_ -> _) |
193 | (_rhs \(k := _rhs (V3 0.0 0.0 0.0)) -> k) | 193 | (_rhs \(k := _rhs (V3 0.0 0.0 0.0)) -> k) |
194 | (\(l :: _) -> case'Nat | 194 | (\(l :: _) -> case'Nat |
195 | (\_ -> _ :: _) | 195 | (\_ -> _) |
196 | (_rhs \(m := _rhs (V4 0.0 0.0 0.0 0.0)) -> m) | 196 | (_rhs \(m := _rhs (V4 0.0 0.0 0.0 0.0)) -> m) |
197 | (\_ -> _rhs undefined) | 197 | (\_ -> _rhs undefined) |
198 | l) | 198 | l) |
@@ -204,19 +204,19 @@ zero | |||
204 | (match'Bool | 204 | (match'Bool |
205 | (\_ -> _) | 205 | (\_ -> _) |
206 | (case'Nat | 206 | (case'Nat |
207 | (\_ -> _ :: _) | 207 | (\_ -> _) |
208 | (_rhs undefined) | 208 | (_rhs undefined) |
209 | (\(n :: _) -> case'Nat | 209 | (\(n :: _) -> case'Nat |
210 | (\_ -> _ :: _) | 210 | (\_ -> _) |
211 | (_rhs undefined) | 211 | (_rhs undefined) |
212 | (\(o :: _) -> case'Nat | 212 | (\(o :: _) -> case'Nat |
213 | (\_ -> _ :: _) | 213 | (\_ -> _) |
214 | (_rhs \(p := _rhs (V2 False False)) -> p) | 214 | (_rhs \(p := _rhs (V2 False False)) -> p) |
215 | (\(q :: _) -> case'Nat | 215 | (\(q :: _) -> case'Nat |
216 | (\_ -> _ :: _) | 216 | (\_ -> _) |
217 | (_rhs \(r := _rhs (V3 False False False)) -> r) | 217 | (_rhs \(r := _rhs (V3 False False False)) -> r) |
218 | (\(s :: _) -> case'Nat | 218 | (\(s :: _) -> case'Nat |
219 | (\_ -> _ :: _) | 219 | (\_ -> _) |
220 | (_rhs \(t := _rhs (V4 False False False False)) -> t) | 220 | (_rhs \(t := _rhs (V4 False False False False)) -> t) |
221 | (\_ -> _rhs undefined) | 221 | (\_ -> _rhs undefined) |
222 | s) | 222 | s) |
@@ -247,19 +247,19 @@ one | |||
247 | (\(e :: _) (f :: _) -> match'Float | 247 | (\(e :: _) (f :: _) -> match'Float |
248 | (\_ -> _) | 248 | (\_ -> _) |
249 | (case'Nat | 249 | (case'Nat |
250 | (\_ -> _ :: _) | 250 | (\_ -> _) |
251 | (_rhs undefined) | 251 | (_rhs undefined) |
252 | (\(g :: _) -> case'Nat | 252 | (\(g :: _) -> case'Nat |
253 | (\_ -> _ :: _) | 253 | (\_ -> _) |
254 | (_rhs undefined) | 254 | (_rhs undefined) |
255 | (\(h :: _) -> case'Nat | 255 | (\(h :: _) -> case'Nat |
256 | (\_ -> _ :: _) | 256 | (\_ -> _) |
257 | (_rhs \(i := _rhs (V2 1.0 1.0)) -> i) | 257 | (_rhs \(i := _rhs (V2 1.0 1.0)) -> i) |
258 | (\(j :: _) -> case'Nat | 258 | (\(j :: _) -> case'Nat |
259 | (\_ -> _ :: _) | 259 | (\_ -> _) |
260 | (_rhs \(k := _rhs (V3 1.0 1.0 1.0)) -> k) | 260 | (_rhs \(k := _rhs (V3 1.0 1.0 1.0)) -> k) |
261 | (\(l :: _) -> case'Nat | 261 | (\(l :: _) -> case'Nat |
262 | (\_ -> _ :: _) | 262 | (\_ -> _) |
263 | (_rhs \(m := _rhs (V4 1.0 1.0 1.0 1.0)) -> m) | 263 | (_rhs \(m := _rhs (V4 1.0 1.0 1.0 1.0)) -> m) |
264 | (\_ -> _rhs undefined) | 264 | (\_ -> _rhs undefined) |
265 | l) | 265 | l) |
@@ -271,19 +271,19 @@ one | |||
271 | (match'Bool | 271 | (match'Bool |
272 | (\_ -> _) | 272 | (\_ -> _) |
273 | (case'Nat | 273 | (case'Nat |
274 | (\_ -> _ :: _) | 274 | (\_ -> _) |
275 | (_rhs undefined) | 275 | (_rhs undefined) |
276 | (\(n :: _) -> case'Nat | 276 | (\(n :: _) -> case'Nat |
277 | (\_ -> _ :: _) | 277 | (\_ -> _) |
278 | (_rhs undefined) | 278 | (_rhs undefined) |
279 | (\(o :: _) -> case'Nat | 279 | (\(o :: _) -> case'Nat |
280 | (\_ -> _ :: _) | 280 | (\_ -> _) |
281 | (_rhs \(p := _rhs (V2 True True)) -> p) | 281 | (_rhs \(p := _rhs (V2 True True)) -> p) |
282 | (\(q :: _) -> case'Nat | 282 | (\(q :: _) -> case'Nat |
283 | (\_ -> _ :: _) | 283 | (\_ -> _) |
284 | (_rhs \(r := _rhs (V3 True True True)) -> r) | 284 | (_rhs \(r := _rhs (V3 True True True)) -> r) |
285 | (\(s :: _) -> case'Nat | 285 | (\(s :: _) -> case'Nat |
286 | (\_ -> _ :: _) | 286 | (\_ -> _) |
287 | (_rhs \(t := _rhs (V4 True True True True)) -> t) | 287 | (_rhs \(t := _rhs (V4 True True True True)) -> t) |
288 | (\_ -> _rhs undefined) | 288 | (\_ -> _rhs undefined) |
289 | s) | 289 | s) |
@@ -317,19 +317,19 @@ one | |||
317 | (\(b :: _) (c :: _) -> match'Float | 317 | (\(b :: _) (c :: _) -> match'Float |
318 | (\_ -> _) | 318 | (\_ -> _) |
319 | (case'Nat | 319 | (case'Nat |
320 | (\_ -> _ :: _) | 320 | (\_ -> _) |
321 | (_rhs ('Empty "no instance of 'Floating on ???")) | 321 | (_rhs ('Empty "no instance of 'Floating on ???")) |
322 | (\(d :: _) -> case'Nat | 322 | (\(d :: _) -> case'Nat |
323 | (\_ -> _ :: _) | 323 | (\_ -> _) |
324 | (_rhs ('Empty "no instance of 'Floating on ???")) | 324 | (_rhs ('Empty "no instance of 'Floating on ???")) |
325 | (\(e :: _) -> case'Nat | 325 | (\(e :: _) -> case'Nat |
326 | (\_ -> _ :: _) | 326 | (\_ -> _) |
327 | (_rhs 'Unit) | 327 | (_rhs 'Unit) |
328 | (\(f :: _) -> case'Nat | 328 | (\(f :: _) -> case'Nat |
329 | (\_ -> _ :: _) | 329 | (\_ -> _) |
330 | (_rhs 'Unit) | 330 | (_rhs 'Unit) |
331 | (\(g :: _) -> case'Nat | 331 | (\(g :: _) -> case'Nat |
332 | (\_ -> _ :: _) | 332 | (\_ -> _) |
333 | (_rhs 'Unit) | 333 | (_rhs 'Unit) |
334 | (\_ -> _rhs ('Empty "no instance of 'Floating on ???")) | 334 | (\_ -> _rhs ('Empty "no instance of 'Floating on ???")) |
335 | g) | 335 | g) |
@@ -343,35 +343,35 @@ one | |||
343 | (match'Mat | 343 | (match'Mat |
344 | (\_ -> _) | 344 | (\_ -> _) |
345 | (\(h :: _) (i :: _) (j :: _) -> case'Nat | 345 | (\(h :: _) (i :: _) (j :: _) -> case'Nat |
346 | (\_ -> _ :: _) | 346 | (\_ -> _) |
347 | (_rhs ('Empty "no instance of 'Floating on ???")) | 347 | (_rhs ('Empty "no instance of 'Floating on ???")) |
348 | (\(k :: _) -> case'Nat | 348 | (\(k :: _) -> case'Nat |
349 | (\_ -> _ :: _) | 349 | (\_ -> _) |
350 | (_rhs ('Empty "no instance of 'Floating on ???")) | 350 | (_rhs ('Empty "no instance of 'Floating on ???")) |
351 | (\(l :: _) -> case'Nat | 351 | (\(l :: _) -> case'Nat |
352 | (\_ -> _ :: _) | 352 | (\_ -> _) |
353 | (case'Nat | 353 | (case'Nat |
354 | (\_ -> _ :: _) | 354 | (\_ -> _) |
355 | (_rhs ('Empty "no instance of 'Floating on ???")) | 355 | (_rhs ('Empty "no instance of 'Floating on ???")) |
356 | (\(m :: _) -> case'Nat | 356 | (\(m :: _) -> case'Nat |
357 | (\_ -> _ :: _) | 357 | (\_ -> _) |
358 | (_rhs ('Empty "no instance of 'Floating on ???")) | 358 | (_rhs ('Empty "no instance of 'Floating on ???")) |
359 | (\(n :: _) -> case'Nat | 359 | (\(n :: _) -> case'Nat |
360 | (\_ -> _ :: _) | 360 | (\_ -> _) |
361 | (match'Float | 361 | (match'Float |
362 | (\_ -> _) | 362 | (\_ -> _) |
363 | (_rhs 'Unit) | 363 | (_rhs 'Unit) |
364 | j | 364 | j |
365 | (_rhs ('Empty "no instance of 'Floating on ???"))) | 365 | (_rhs ('Empty "no instance of 'Floating on ???"))) |
366 | (\(o :: _) -> case'Nat | 366 | (\(o :: _) -> case'Nat |
367 | (\_ -> _ :: _) | 367 | (\_ -> _) |
368 | (match'Float | 368 | (match'Float |
369 | (\_ -> _) | 369 | (\_ -> _) |
370 | (_rhs 'Unit) | 370 | (_rhs 'Unit) |
371 | j | 371 | j |
372 | (_rhs ('Empty "no instance of 'Floating on ???"))) | 372 | (_rhs ('Empty "no instance of 'Floating on ???"))) |
373 | (\(p :: _) -> case'Nat | 373 | (\(p :: _) -> case'Nat |
374 | (\_ -> _ :: _) | 374 | (\_ -> _) |
375 | (match'Float | 375 | (match'Float |
376 | (\_ -> _) | 376 | (\_ -> _) |
377 | (_rhs 'Unit) | 377 | (_rhs 'Unit) |
@@ -384,29 +384,29 @@ one | |||
384 | m) | 384 | m) |
385 | i) | 385 | i) |
386 | (\(q :: _) -> case'Nat | 386 | (\(q :: _) -> case'Nat |
387 | (\_ -> _ :: _) | 387 | (\_ -> _) |
388 | (case'Nat | 388 | (case'Nat |
389 | (\_ -> _ :: _) | 389 | (\_ -> _) |
390 | (_rhs ('Empty "no instance of 'Floating on ???")) | 390 | (_rhs ('Empty "no instance of 'Floating on ???")) |
391 | (\(r :: _) -> case'Nat | 391 | (\(r :: _) -> case'Nat |
392 | (\_ -> _ :: _) | 392 | (\_ -> _) |
393 | (_rhs ('Empty "no instance of 'Floating on ???")) | 393 | (_rhs ('Empty "no instance of 'Floating on ???")) |
394 | (\(s :: _) -> case'Nat | 394 | (\(s :: _) -> case'Nat |
395 | (\_ -> _ :: _) | 395 | (\_ -> _) |
396 | (match'Float | 396 | (match'Float |
397 | (\_ -> _) | 397 | (\_ -> _) |
398 | (_rhs 'Unit) | 398 | (_rhs 'Unit) |
399 | j | 399 | j |
400 | (_rhs ('Empty "no instance of 'Floating on ???"))) | 400 | (_rhs ('Empty "no instance of 'Floating on ???"))) |
401 | (\(t :: _) -> case'Nat | 401 | (\(t :: _) -> case'Nat |
402 | (\_ -> _ :: _) | 402 | (\_ -> _) |
403 | (match'Float | 403 | (match'Float |
404 | (\_ -> _) | 404 | (\_ -> _) |
405 | (_rhs 'Unit) | 405 | (_rhs 'Unit) |
406 | j | 406 | j |
407 | (_rhs ('Empty "no instance of 'Floating on ???"))) | 407 | (_rhs ('Empty "no instance of 'Floating on ???"))) |
408 | (\(u :: _) -> case'Nat | 408 | (\(u :: _) -> case'Nat |
409 | (\_ -> _ :: _) | 409 | (\_ -> _) |
410 | (match'Float | 410 | (match'Float |
411 | (\_ -> _) | 411 | (\_ -> _) |
412 | (_rhs 'Unit) | 412 | (_rhs 'Unit) |
@@ -419,29 +419,29 @@ one | |||
419 | r) | 419 | r) |
420 | i) | 420 | i) |
421 | (\(v :: _) -> case'Nat | 421 | (\(v :: _) -> case'Nat |
422 | (\_ -> _ :: _) | 422 | (\_ -> _) |
423 | (case'Nat | 423 | (case'Nat |
424 | (\_ -> _ :: _) | 424 | (\_ -> _) |
425 | (_rhs ('Empty "no instance of 'Floating on ???")) | 425 | (_rhs ('Empty "no instance of 'Floating on ???")) |
426 | (\(w :: _) -> case'Nat | 426 | (\(w :: _) -> case'Nat |
427 | (\_ -> _ :: _) | 427 | (\_ -> _) |
428 | (_rhs ('Empty "no instance of 'Floating on ???")) | 428 | (_rhs ('Empty "no instance of 'Floating on ???")) |
429 | (\(x :: _) -> case'Nat | 429 | (\(x :: _) -> case'Nat |
430 | (\_ -> _ :: _) | 430 | (\_ -> _) |
431 | (match'Float | 431 | (match'Float |
432 | (\_ -> _) | 432 | (\_ -> _) |
433 | (_rhs 'Unit) | 433 | (_rhs 'Unit) |
434 | j | 434 | j |
435 | (_rhs ('Empty "no instance of 'Floating on ???"))) | 435 | (_rhs ('Empty "no instance of 'Floating on ???"))) |
436 | (\(y :: _) -> case'Nat | 436 | (\(y :: _) -> case'Nat |
437 | (\_ -> _ :: _) | 437 | (\_ -> _) |
438 | (match'Float | 438 | (match'Float |
439 | (\_ -> _) | 439 | (\_ -> _) |
440 | (_rhs 'Unit) | 440 | (_rhs 'Unit) |
441 | j | 441 | j |
442 | (_rhs ('Empty "no instance of 'Floating on ???"))) | 442 | (_rhs ('Empty "no instance of 'Floating on ???"))) |
443 | (\(z :: _) -> case'Nat | 443 | (\(z :: _) -> case'Nat |
444 | (\_ -> _ :: _) | 444 | (\_ -> _) |
445 | (match'Float | 445 | (match'Float |
446 | (\_ -> _) | 446 | (\_ -> _) |
447 | (_rhs 'Unit) | 447 | (_rhs 'Unit) |
@@ -645,27 +645,23 @@ PrimNoise2 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 2) Float | |||
645 | PrimNoise3 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 3) Float | 645 | PrimNoise3 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 3) Float |
646 | PrimNoise4 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 4) Float | 646 | PrimNoise4 :: forall (a :: _) . VecScalar a Float -> Vec (fromInt 4) Float |
647 | head | 647 | head |
648 | = \(a :: _) -> case'List | 648 | = \(a :: _) -> case'List (\_ -> _) (_rhs undefined) (\(b :: _) _ -> _rhs b) a |
649 | (\_ -> _ :: _) | ||
650 | (_rhs undefined) | ||
651 | (\(b :: _) _ -> _rhs b) | ||
652 | a | ||
653 | (++) | 649 | (++) |
654 | = \(a :: _) (b :: _) -> case'List | 650 | = \(a :: _) (b :: _) -> case'List |
655 | (\_ -> _ :: _) | 651 | (\_ -> _) |
656 | (_rhs b) | 652 | (_rhs b) |
657 | (\(c :: _) (d :: _) -> _rhs (c : d ++ b)) | 653 | (\(c :: _) (d :: _) -> _rhs (c : d ++ b)) |
658 | a | 654 | a |
659 | foldr | 655 | foldr |
660 | = \(a :: _) (b :: _) (c :: _) -> case'List | 656 | = \(a :: _) (b :: _) (c :: _) -> case'List |
661 | (\_ -> _ :: _) | 657 | (\_ -> _) |
662 | (_rhs b) | 658 | (_rhs b) |
663 | (\(d :: _) (e :: _) -> _rhs (a d (foldr a b e))) | 659 | (\(d :: _) (e :: _) -> _rhs (a d (foldr a b e))) |
664 | c | 660 | c |
665 | concat = _rhs (foldr (++) []) | 661 | concat = _rhs (foldr (++) []) |
666 | map | 662 | map |
667 | = \(a :: _) (b :: _) -> case'List | 663 | = \(a :: _) (b :: _) -> case'List |
668 | (\_ -> _ :: _) | 664 | (\_ -> _) |
669 | (_rhs []) | 665 | (_rhs []) |
670 | (\(c :: _) (d :: _) -> _rhs (a c : map a d)) | 666 | (\(c :: _) (d :: _) -> _rhs (a c : map a d)) |
671 | b | 667 | b |
@@ -674,7 +670,7 @@ concatMap | |||
674 | :: forall (c :: _) (d :: _) . (c -> [d]) -> [c] -> [d] | 670 | :: forall (c :: _) (d :: _) . (c -> [d]) -> [c] -> [d] |
675 | len | 671 | len |
676 | = \(a :: _) -> case'List | 672 | = \(a :: _) -> case'List |
677 | (\_ -> _ :: _) | 673 | (\_ -> _) |
678 | (_rhs (fromInt 0)) | 674 | (_rhs (fromInt 0)) |
679 | (\_ (b :: _) -> _rhs (fromInt 1 `primAddInt` len b)) | 675 | (\_ (b :: _) -> _rhs (fromInt 1 `primAddInt` len b)) |
680 | a | 676 | a |
@@ -718,9 +714,9 @@ data SimpleFragment (_ :: Type) :: Type where | |||
718 | SimpleFragment :: forall a . Vec (fromInt 3) Float -> a -> SimpleFragment a | 714 | SimpleFragment :: forall a . Vec (fromInt 3) Float -> a -> SimpleFragment a |
719 | 'Fragment = \(a :: _) (b :: _) -> _rhs ('Vector a ('Maybe ('SimpleFragment b))) | 715 | 'Fragment = \(a :: _) (b :: _) -> _rhs ('Vector a ('Maybe ('SimpleFragment b))) |
720 | sFragmentCoords | 716 | sFragmentCoords |
721 | = \(a :: _) -> case'SimpleFragment (\_ -> _ :: _) (\(b :: _) _ -> _rhs b) a | 717 | = \(a :: _) -> case'SimpleFragment (\_ -> _) (\(b :: _) _ -> _rhs b) a |
722 | sFragmentValue | 718 | sFragmentValue |
723 | = \(a :: _) -> case'SimpleFragment (\_ -> _ :: _) (\_ (b :: _) -> _rhs b) a | 719 | = \(a :: _) -> case'SimpleFragment (\_ -> _) (\_ (b :: _) -> _rhs b) a |
724 | 'FragmentStream = \(a :: _) (b :: _) -> _rhs ['Fragment a b] | 720 | 'FragmentStream = \(a :: _) (b :: _) -> _rhs ['Fragment a b] |
725 | customizeDepth | 721 | customizeDepth |
726 | :: forall (a :: _) (b :: _) . (a -> Float) -> Fragment b a -> Fragment b a | 722 | :: forall (a :: _) (b :: _) . (a -> Float) -> Fragment b a -> Fragment b a |
@@ -746,7 +742,7 @@ data ImageKind :: Type where | |||
746 | Stencil :: ImageKind | 742 | Stencil :: ImageKind |
747 | imageType | 743 | imageType |
748 | = (\(a :: _) -> case'ImageKind | 744 | = (\(a :: _) -> case'ImageKind |
749 | (\_ -> _ :: _) | 745 | (\_ -> _) |
750 | (\(b :: _) -> _rhs b) | 746 | (\(b :: _) -> _rhs b) |
751 | (_rhs 'Float) | 747 | (_rhs 'Float) |
752 | (_rhs 'Int) | 748 | (_rhs 'Int) |
@@ -768,23 +764,23 @@ data Swizz :: Type where | |||
768 | Sw :: Swizz | 764 | Sw :: Swizz |
769 | swizzscalar | 765 | swizzscalar |
770 | = (\(a :: _) (b :: _) -> case'VecS | 766 | = (\(a :: _) (b :: _) -> case'VecS |
771 | (\_ _ -> _ :: _) | 767 | (\_ _ -> _) |
772 | (\(c :: _) (d :: _) -> case'Swizz | 768 | (\(c :: _) (d :: _) -> case'Swizz |
773 | (\_ -> _ :: _) | 769 | (\_ -> _) |
774 | (_rhs c) | 770 | (_rhs c) |
775 | (_rhs d) | 771 | (_rhs d) |
776 | (_rhs undefined) | 772 | (_rhs undefined) |
777 | (_rhs undefined) | 773 | (_rhs undefined) |
778 | b) | 774 | b) |
779 | (\(e :: _) (f :: _) (g :: _) -> case'Swizz | 775 | (\(e :: _) (f :: _) (g :: _) -> case'Swizz |
780 | (\_ -> _ :: _) | 776 | (\_ -> _) |
781 | (_rhs e) | 777 | (_rhs e) |
782 | (_rhs f) | 778 | (_rhs f) |
783 | (_rhs g) | 779 | (_rhs g) |
784 | (_rhs undefined) | 780 | (_rhs undefined) |
785 | b) | 781 | b) |
786 | (\(h :: _) (i :: _) (j :: _) (k :: _) -> case'Swizz | 782 | (\(h :: _) (i :: _) (j :: _) (k :: _) -> case'Swizz |
787 | (\_ -> _ :: _) | 783 | (\_ -> _) |
788 | (_rhs h) | 784 | (_rhs h) |
789 | (_rhs i) | 785 | (_rhs i) |
790 | (_rhs j) | 786 | (_rhs j) |
@@ -794,7 +790,7 @@ swizzscalar | |||
794 | :: forall (l :: _) (m :: _) . Vec m l -> Swizz -> l | 790 | :: forall (l :: _) (m :: _) . Vec m l -> Swizz -> l |
795 | definedVec | 791 | definedVec |
796 | = (\(a :: _) -> case'VecS | 792 | = (\(a :: _) -> case'VecS |
797 | (\_ _ -> _ :: _) | 793 | (\_ _ -> _) |
798 | (\_ _ -> _rhs True) | 794 | (\_ _ -> _rhs True) |
799 | (\_ _ _ -> _rhs True) | 795 | (\_ _ _ -> _rhs True) |
800 | (\_ _ _ _ -> _rhs True) | 796 | (\_ _ _ _ -> _rhs True) |
@@ -802,7 +798,7 @@ definedVec | |||
802 | :: forall (b :: _) (c :: _) . Vec c b -> Bool | 798 | :: forall (b :: _) (c :: _) . Vec c b -> Bool |
803 | swizzvector | 799 | swizzvector |
804 | = (\(a :: _) (b :: _) -> case'Bool | 800 | = (\(a :: _) (b :: _) -> case'Bool |
805 | (\_ -> _ :: _) | 801 | (\_ -> _) |
806 | (_rhs undefined) | 802 | (_rhs undefined) |
807 | (_rhs (mapVec (swizzscalar a) b)) | 803 | (_rhs (mapVec (swizzscalar a) b)) |
808 | (definedVec a)) | 804 | (definedVec a)) |
@@ -933,10 +929,10 @@ rasterizePrimitives | |||
933 | :: Type -> Nat | 929 | :: Type -> Nat |
934 | allSame | 930 | allSame |
935 | = (\(a :: _) -> case'List | 931 | = (\(a :: _) -> case'List |
936 | (\_ -> _ :: _) | 932 | (\_ -> _) |
937 | (_rhs 'Unit) | 933 | (_rhs 'Unit) |
938 | (\(b :: _) (c :: _) -> case'List | 934 | (\(b :: _) (c :: _) -> case'List |
939 | (\_ -> _ :: _) | 935 | (\_ -> _) |
940 | (_rhs 'Unit) | 936 | (_rhs 'Unit) |
941 | (\(d :: _) (e :: _) -> _rhs ('T2 (b `'EqCTt` d) (allSame (d : e)))) | 937 | (\(d :: _) (e :: _) -> _rhs ('T2 (b `'EqCTt` d) (allSame (d : e)))) |
942 | c) | 938 | c) |
@@ -947,10 +943,10 @@ data FrameBuffer (_ :: Nat) (_ :: [ImageKind]) :: Type where | |||
947 | 943 | ||
948 | imageType' | 944 | imageType' |
949 | = (\(a :: _) -> case'List | 945 | = (\(a :: _) -> case'List |
950 | (\_ -> _ :: _) | 946 | (\_ -> _) |
951 | (_rhs (map imageType a)) | 947 | (_rhs (map imageType a)) |
952 | (\(b :: _) (c :: _) -> case'ImageKind | 948 | (\(b :: _) (c :: _) -> case'ImageKind |
953 | (\_ -> _ :: _) | 949 | (\_ -> _) |
954 | (\_ -> _rhs (map imageType a)) | 950 | (\_ -> _rhs (map imageType a)) |
955 | (_rhs (map imageType c)) | 951 | (_rhs (map imageType c)) |
956 | (_rhs (map imageType a)) | 952 | (_rhs (map imageType a)) |
@@ -972,10 +968,10 @@ Accumulate | |||
972 | accumulateWith = \(a :: _) (b :: _) -> _rhs (HCons a (HCons b HNil)) | 968 | accumulateWith = \(a :: _) (b :: _) -> _rhs (HCons a (HCons b HNil)) |
973 | overlay | 969 | overlay |
974 | = \(a :: _) (b :: _) -> hlistConsCase | 970 | = \(a :: _) (b :: _) -> hlistConsCase |
975 | (_ :: _) | 971 | _ |
976 | (\(c :: _) (d :: _) -> hlistConsCase | 972 | (\(c :: _) (d :: _) -> hlistConsCase |
977 | (_ :: _) | 973 | _ |
978 | (\(e :: _) (f :: _) -> hlistNilCase (_ :: _) (_rhs (Accumulate c e a)) f) | 974 | (\(e :: _) (f :: _) -> hlistNilCase _ (_rhs (Accumulate c e a)) f) |
979 | d) | 975 | d) |
980 | b | 976 | b |
981 | infixl 0 overlay | 977 | infixl 0 overlay |
diff --git a/testdata/Internals.out b/testdata/Internals.out index 78586125..9ae0f3e1 100644 --- a/testdata/Internals.out +++ b/testdata/Internals.out | |||
@@ -51,15 +51,10 @@ primModInt :: Int -> Int -> Int | |||
51 | primSqrtFloat :: Float -> Float | 51 | primSqrtFloat :: Float -> Float |
52 | primRound :: Float -> Int | 52 | primRound :: Float -> Int |
53 | primIfThenElse | 53 | primIfThenElse |
54 | = (\(a :: _) (b :: _) (c :: _) -> case'Bool (\_ -> _ :: _) (_rhs c) (_rhs b) a) | 54 | = (\(a :: _) (b :: _) (c :: _) -> case'Bool (\_ -> _) (_rhs c) (_rhs b) a) |
55 | :: forall (d :: _) . Bool -> d -> d -> d | 55 | :: forall (d :: _) . Bool -> d -> d -> d |
56 | isEQ | 56 | isEQ |
57 | = \(a :: _) -> case'Ordering | 57 | = \(a :: _) -> case'Ordering (\_ -> _) (_rhs False) (_rhs True) (_rhs False) a |
58 | (\_ -> _ :: _) | ||
59 | (_rhs False) | ||
60 | (_rhs True) | ||
61 | (_rhs False) | ||
62 | a | ||
63 | 'Num | 58 | 'Num |
64 | = (\(a :: _) -> match'Int | 59 | = (\(a :: _) -> match'Int |
65 | (\_ -> _) | 60 | (\_ -> _) |
@@ -177,9 +172,9 @@ negate | |||
177 | (_rhs | 172 | (_rhs |
178 | \(n | 173 | \(n |
179 | := \(o :: _) (p :: _) -> case'Bool | 174 | := \(o :: _) (p :: _) -> case'Bool |
180 | (\_ -> _ :: _) | 175 | (\_ -> _) |
181 | (case'Bool (\_ -> _ :: _) (_rhs True) (_rhs False) p) | 176 | (case'Bool (\_ -> _) (_rhs True) (_rhs False) p) |
182 | (case'Bool (\_ -> _ :: _) (_rhs False) (_rhs True) p) | 177 | (case'Bool (\_ -> _) (_rhs False) (_rhs True) p) |
183 | o) -> n) | 178 | o) -> n) |
184 | a | 179 | a |
185 | (match'Nat | 180 | (match'Nat |
@@ -187,13 +182,9 @@ negate | |||
187 | (_rhs | 182 | (_rhs |
188 | \(q | 183 | \(q |
189 | := \(r :: _) (s :: _) -> case'Nat | 184 | := \(r :: _) (s :: _) -> case'Nat |
190 | (\_ -> _ :: _) | 185 | (\_ -> _) |
191 | (case'Nat (\_ -> _ :: _) (_rhs True) (\_ -> _rhs False) s) | 186 | (case'Nat (\_ -> _) (_rhs True) (\_ -> _rhs False) s) |
192 | (\(t :: _) -> case'Nat | 187 | (\(t :: _) -> case'Nat (\_ -> _) (_rhs False) (\(u :: _) -> _rhs (t == u)) s) |
193 | (\_ -> _ :: _) | ||
194 | (_rhs False) | ||
195 | (\(u :: _) -> _rhs (t == u)) | ||
196 | s) | ||
197 | r) -> q) | 188 | r) -> q) |
198 | a | 189 | a |
199 | (_rhs undefined))))))) | 190 | (_rhs undefined))))))) |
diff --git a/testdata/Material.out b/testdata/Material.out index 2665eadb..fa9c9eb4 100644 --- a/testdata/Material.out +++ b/testdata/Material.out | |||
@@ -5,14 +5,11 @@ data Entity :: Type where | |||
5 | :: Vec (fromInt 4) Float | 5 | :: Vec (fromInt 4) Float |
6 | -> Vec (fromInt 4) Float | 6 | -> Vec (fromInt 4) Float |
7 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity | 7 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity |
8 | eAmbientLight | 8 | eAmbientLight = \(a :: _) -> case'Entity (\_ -> _) (\(b :: _) _ _ _ -> _rhs b) a |
9 | = \(a :: _) -> case'Entity (\_ -> _ :: _) (\(b :: _) _ _ _ -> _rhs b) a | ||
10 | eDirectedLight | 9 | eDirectedLight |
11 | = \(a :: _) -> case'Entity (\_ -> _ :: _) (\_ (b :: _) _ _ -> _rhs b) a | 10 | = \(a :: _) -> case'Entity (\_ -> _) (\_ (b :: _) _ _ -> _rhs b) a |
12 | eLightDir | 11 | eLightDir = \(a :: _) -> case'Entity (\_ -> _) (\_ _ (b :: _) _ -> _rhs b) a |
13 | = \(a :: _) -> case'Entity (\_ -> _ :: _) (\_ _ (b :: _) _ -> _rhs b) a | 12 | eShaderRGBA = \(a :: _) -> case'Entity (\_ -> _) (\_ _ _ (b :: _) -> _rhs b) a |
14 | eShaderRGBA | ||
15 | = \(a :: _) -> case'Entity (\_ -> _ :: _) (\_ _ _ (b :: _) -> _rhs b) a | ||
16 | data WaveType :: Type where | 13 | data WaveType :: Type where |
17 | WT_Sin :: WaveType | 14 | WT_Sin :: WaveType |
18 | WT_Triangle :: WaveType | 15 | WT_Triangle :: WaveType |
@@ -114,57 +111,57 @@ data StageAttrs :: Type where | |||
114 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs | 111 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs |
115 | saBlend | 112 | saBlend |
116 | = \(a :: _) -> case'StageAttrs | 113 | = \(a :: _) -> case'StageAttrs |
117 | (\_ -> _ :: _) | 114 | (\_ -> _) |
118 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 115 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
119 | a | 116 | a |
120 | saRGBGen | 117 | saRGBGen |
121 | = \(a :: _) -> case'StageAttrs | 118 | = \(a :: _) -> case'StageAttrs |
122 | (\_ -> _ :: _) | 119 | (\_ -> _) |
123 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 120 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
124 | a | 121 | a |
125 | saAlphaGen | 122 | saAlphaGen |
126 | = \(a :: _) -> case'StageAttrs | 123 | = \(a :: _) -> case'StageAttrs |
127 | (\_ -> _ :: _) | 124 | (\_ -> _) |
128 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 125 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
129 | a | 126 | a |
130 | saTCGen | 127 | saTCGen |
131 | = \(a :: _) -> case'StageAttrs | 128 | = \(a :: _) -> case'StageAttrs |
132 | (\_ -> _ :: _) | 129 | (\_ -> _) |
133 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 130 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
134 | a | 131 | a |
135 | saTCMod | 132 | saTCMod |
136 | = \(a :: _) -> case'StageAttrs | 133 | = \(a :: _) -> case'StageAttrs |
137 | (\_ -> _ :: _) | 134 | (\_ -> _) |
138 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 135 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
139 | a | 136 | a |
140 | saTexture | 137 | saTexture |
141 | = \(a :: _) -> case'StageAttrs | 138 | = \(a :: _) -> case'StageAttrs |
142 | (\_ -> _ :: _) | 139 | (\_ -> _) |
143 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 140 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
144 | a | 141 | a |
145 | saDepthWrite | 142 | saDepthWrite |
146 | = \(a :: _) -> case'StageAttrs | 143 | = \(a :: _) -> case'StageAttrs |
147 | (\_ -> _ :: _) | 144 | (\_ -> _) |
148 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 145 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
149 | a | 146 | a |
150 | saDepthFunc | 147 | saDepthFunc |
151 | = \(a :: _) -> case'StageAttrs | 148 | = \(a :: _) -> case'StageAttrs |
152 | (\_ -> _ :: _) | 149 | (\_ -> _) |
153 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 150 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
154 | a | 151 | a |
155 | saAlphaFunc | 152 | saAlphaFunc |
156 | = \(a :: _) -> case'StageAttrs | 153 | = \(a :: _) -> case'StageAttrs |
157 | (\_ -> _ :: _) | 154 | (\_ -> _) |
158 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 155 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
159 | a | 156 | a |
160 | saDepthMaskExplicit | 157 | saDepthMaskExplicit |
161 | = \(a :: _) -> case'StageAttrs | 158 | = \(a :: _) -> case'StageAttrs |
162 | (\_ -> _ :: _) | 159 | (\_ -> _) |
163 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 160 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
164 | a | 161 | a |
165 | saTextureUniform | 162 | saTextureUniform |
166 | = \(a :: _) -> case'StageAttrs | 163 | = \(a :: _) -> case'StageAttrs |
167 | (\_ -> _ :: _) | 164 | (\_ -> _) |
168 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 165 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
169 | a | 166 | a |
170 | defaultStageAttrs | 167 | defaultStageAttrs |
@@ -193,62 +190,62 @@ data CommonAttrs :: Type where | |||
193 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs | 190 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs |
194 | caSkyParms | 191 | caSkyParms |
195 | = \(a :: _) -> case'CommonAttrs | 192 | = \(a :: _) -> case'CommonAttrs |
196 | (\_ -> _ :: _) | 193 | (\_ -> _) |
197 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 194 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
198 | a | 195 | a |
199 | caFogParms | 196 | caFogParms |
200 | = \(a :: _) -> case'CommonAttrs | 197 | = \(a :: _) -> case'CommonAttrs |
201 | (\_ -> _ :: _) | 198 | (\_ -> _) |
202 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 199 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
203 | a | 200 | a |
204 | caPortal | 201 | caPortal |
205 | = \(a :: _) -> case'CommonAttrs | 202 | = \(a :: _) -> case'CommonAttrs |
206 | (\_ -> _ :: _) | 203 | (\_ -> _) |
207 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 204 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
208 | a | 205 | a |
209 | caSort | 206 | caSort |
210 | = \(a :: _) -> case'CommonAttrs | 207 | = \(a :: _) -> case'CommonAttrs |
211 | (\_ -> _ :: _) | 208 | (\_ -> _) |
212 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 209 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
213 | a | 210 | a |
214 | caEntityMergable | 211 | caEntityMergable |
215 | = \(a :: _) -> case'CommonAttrs | 212 | = \(a :: _) -> case'CommonAttrs |
216 | (\_ -> _ :: _) | 213 | (\_ -> _) |
217 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 214 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
218 | a | 215 | a |
219 | caFogOnly | 216 | caFogOnly |
220 | = \(a :: _) -> case'CommonAttrs | 217 | = \(a :: _) -> case'CommonAttrs |
221 | (\_ -> _ :: _) | 218 | (\_ -> _) |
222 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 219 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
223 | a | 220 | a |
224 | caCull | 221 | caCull |
225 | = \(a :: _) -> case'CommonAttrs | 222 | = \(a :: _) -> case'CommonAttrs |
226 | (\_ -> _ :: _) | 223 | (\_ -> _) |
227 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 224 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
228 | a | 225 | a |
229 | caDeformVertexes | 226 | caDeformVertexes |
230 | = \(a :: _) -> case'CommonAttrs | 227 | = \(a :: _) -> case'CommonAttrs |
231 | (\_ -> _ :: _) | 228 | (\_ -> _) |
232 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 229 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
233 | a | 230 | a |
234 | caNoMipMaps | 231 | caNoMipMaps |
235 | = \(a :: _) -> case'CommonAttrs | 232 | = \(a :: _) -> case'CommonAttrs |
236 | (\_ -> _ :: _) | 233 | (\_ -> _) |
237 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 234 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
238 | a | 235 | a |
239 | caPolygonOffset | 236 | caPolygonOffset |
240 | = \(a :: _) -> case'CommonAttrs | 237 | = \(a :: _) -> case'CommonAttrs |
241 | (\_ -> _ :: _) | 238 | (\_ -> _) |
242 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 239 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
243 | a | 240 | a |
244 | caStages | 241 | caStages |
245 | = \(a :: _) -> case'CommonAttrs | 242 | = \(a :: _) -> case'CommonAttrs |
246 | (\_ -> _ :: _) | 243 | (\_ -> _) |
247 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 244 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
248 | a | 245 | a |
249 | caIsSky | 246 | caIsSky |
250 | = \(a :: _) -> case'CommonAttrs | 247 | = \(a :: _) -> case'CommonAttrs |
251 | (\_ -> _ :: _) | 248 | (\_ -> _) |
252 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 249 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
253 | a | 250 | a |
254 | defaultCommonAttrs | 251 | defaultCommonAttrs |
diff --git a/testdata/Prelude.out b/testdata/Prelude.out index 971fc3a3..56e17569 100644 --- a/testdata/Prelude.out +++ b/testdata/Prelude.out | |||
@@ -12,30 +12,27 @@ otherwise = _rhs True | |||
12 | (.) = _rhs \(a :: _) (b :: _) (c :: _) -> a (b c) | 12 | (.) = _rhs \(a :: _) (b :: _) (c :: _) -> a (b c) |
13 | uncurry | 13 | uncurry |
14 | = \(a :: _) (b :: _) -> hlistConsCase | 14 | = \(a :: _) (b :: _) -> hlistConsCase |
15 | (_ :: _) | 15 | _ |
16 | (\(c :: _) (d :: _) -> hlistConsCase | 16 | (\(c :: _) (d :: _) -> hlistConsCase |
17 | (_ :: _) | 17 | _ |
18 | (\(e :: _) (f :: _) -> hlistNilCase (_ :: _) (_rhs (a c e)) f) | 18 | (\(e :: _) (f :: _) -> hlistNilCase _ (_rhs (a c e)) f) |
19 | d) | 19 | d) |
20 | b | 20 | b |
21 | (***) | 21 | (***) |
22 | = \(a :: _) (b :: _) (c :: _) -> hlistConsCase | 22 | = \(a :: _) (b :: _) (c :: _) -> hlistConsCase |
23 | (_ :: _) | 23 | _ |
24 | (\(d :: _) (e :: _) -> hlistConsCase | 24 | (\(d :: _) (e :: _) -> hlistConsCase |
25 | (_ :: _) | 25 | _ |
26 | (\(f :: _) (g :: _) -> hlistNilCase | 26 | (\(f :: _) (g :: _) -> hlistNilCase _ (_rhs (HCons (a d) (HCons (b f) HNil))) g) |
27 | (_ :: _) | ||
28 | (_rhs (HCons (a d) (HCons (b f) HNil))) | ||
29 | g) | ||
30 | e) | 27 | e) |
31 | c | 28 | c |
32 | pi = _rhs 3.141592653589793 | 29 | pi = _rhs 3.141592653589793 |
33 | zip | 30 | zip |
34 | = (\(a :: _) (b :: _) -> case'List | 31 | = (\(a :: _) (b :: _) -> case'List |
35 | (\_ -> _ :: _) | 32 | (\_ -> _) |
36 | (_rhs []) | 33 | (_rhs []) |
37 | (\(c :: _) (d :: _) -> case'List | 34 | (\(c :: _) (d :: _) -> case'List |
38 | (\_ -> _ :: _) | 35 | (\_ -> _) |
39 | (_rhs []) | 36 | (_rhs []) |
40 | (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip d f)) | 37 | (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip d f)) |
41 | b) | 38 | b) |
@@ -43,34 +40,28 @@ zip | |||
43 | :: forall (g :: _) (h :: _) . [g] -> [h] -> [HList (g : h : '[])] | 40 | :: forall (g :: _) (h :: _) . [g] -> [h] -> [HList (g : h : '[])] |
44 | unzip | 41 | unzip |
45 | = (\(a :: _) -> case'List | 42 | = (\(a :: _) -> case'List |
46 | (\_ -> _ :: _) | 43 | (\_ -> _) |
47 | (_rhs (HCons [] (HCons [] HNil))) | 44 | (_rhs (HCons [] (HCons [] HNil))) |
48 | (\(b :: _) (c :: _) -> hlistConsCase | 45 | (\(b :: _) (c :: _) -> hlistConsCase |
49 | (_ :: _) | 46 | _ |
50 | (\(d :: _) (e :: _) -> hlistConsCase | 47 | (\(d :: _) (e :: _) -> hlistConsCase |
51 | (_ :: _) | 48 | _ |
52 | (\(f :: _) (g :: _) -> hlistNilCase | 49 | (\(f :: _) (g :: _) -> hlistNilCase |
53 | (_ :: _) | 50 | _ |
54 | (_rhs | 51 | (_rhs |
55 | \(h := _rhs (unzip c)) | 52 | \(h := _rhs (unzip c)) |
56 | (i | 53 | (i |
57 | := _rhs | 54 | := _rhs |
58 | ((\(k :: _) -> hlistConsCase | 55 | ((\(k :: _) -> hlistConsCase |
59 | (_ :: _) | 56 | _ |
60 | (\_ (l :: _) -> hlistConsCase | 57 | (\_ (l :: _) -> hlistConsCase _ (\(m :: _) (n :: _) -> hlistNilCase _ m n) l) |
61 | (_ :: _) | ||
62 | (\(m :: _) (n :: _) -> hlistNilCase (_ :: _) m n) | ||
63 | l) | ||
64 | k) | 58 | k) |
65 | h)) | 59 | h)) |
66 | (j | 60 | (j |
67 | := _rhs | 61 | := _rhs |
68 | ((\(o :: _) -> hlistConsCase | 62 | ((\(o :: _) -> hlistConsCase |
69 | (_ :: _) | 63 | _ |
70 | (\(p :: _) (q :: _) -> hlistConsCase | 64 | (\(p :: _) (q :: _) -> hlistConsCase _ (\_ (r :: _) -> hlistNilCase _ p r) q) |
71 | (_ :: _) | ||
72 | (\_ (r :: _) -> hlistNilCase (_ :: _) p r) | ||
73 | q) | ||
74 | o) | 65 | o) |
75 | h)) -> HCons (d : j) (HCons (f : i) HNil)) | 66 | h)) -> HCons (d : j) (HCons (f : i) HNil)) |
76 | g) | 67 | g) |
@@ -80,70 +71,60 @@ unzip | |||
80 | :: forall (s :: _) (t :: _) . [HList (s : t : '[])] -> HList ([s] : [t] : '[]) | 71 | :: forall (s :: _) (t :: _) . [HList (s : t : '[])] -> HList ([s] : [t] : '[]) |
81 | filter | 72 | filter |
82 | = \(a :: _) (b :: _) -> case'List | 73 | = \(a :: _) (b :: _) -> case'List |
83 | (\_ -> _ :: _) | 74 | (\_ -> _) |
84 | (_rhs []) | 75 | (_rhs []) |
85 | (\(c :: _) (d :: _) -> _rhs | 76 | (\(c :: _) (d :: _) -> _rhs |
86 | ((\(e :: _) -> case'Bool (\_ -> _ :: _) (filter a d) (c : filter a d) e) (a c))) | 77 | ((\(e :: _) -> case'Bool (\_ -> _) (filter a d) (c : filter a d) e) (a c))) |
87 | b | 78 | b |
88 | tail | 79 | tail |
89 | = (\(a :: _) -> case'List | 80 | = (\(a :: _) -> case'List (\_ -> _) (_rhs undefined) (\_ (b :: _) -> _rhs b) a) |
90 | (\_ -> _ :: _) | ||
91 | (_rhs undefined) | ||
92 | (\_ (b :: _) -> _rhs b) | ||
93 | a) | ||
94 | :: forall (c :: _) . [c] -> [c] | 81 | :: forall (c :: _) . [c] -> [c] |
95 | pairs | 82 | pairs |
96 | = (\(a :: _) -> _rhs (zip a (tail a))) | 83 | = (\(a :: _) -> _rhs (zip a (tail a))) |
97 | :: forall (b :: _) . [b] -> [HList (b : b : '[])] | 84 | :: forall (b :: _) . [b] -> [HList (b : b : '[])] |
98 | foldl' | 85 | foldl' |
99 | = \(a :: _) (b :: _) (c :: _) -> case'List | 86 | = \(a :: _) (b :: _) (c :: _) -> case'List |
100 | (\_ -> _ :: _) | 87 | (\_ -> _) |
101 | (_rhs b) | 88 | (_rhs b) |
102 | (\(d :: _) (e :: _) -> _rhs (foldl' a (a b d) e)) | 89 | (\(d :: _) (e :: _) -> _rhs (foldl' a (a b d) e)) |
103 | c | 90 | c |
104 | foldr1 | 91 | foldr1 |
105 | = \(a :: _) (b :: _) -> case'List | 92 | = \(a :: _) (b :: _) -> case'List |
106 | (\_ -> _ :: _) | 93 | (\_ -> _) |
107 | (_rhs undefined) | 94 | (_rhs undefined) |
108 | (\(c :: _) (d :: _) -> _rhs (foldr a c d)) | 95 | (\(c :: _) (d :: _) -> _rhs (foldr a c d)) |
109 | b | 96 | b |
110 | split | 97 | split |
111 | = \(a :: _) -> case'List | 98 | = \(a :: _) -> case'List |
112 | (\_ -> _ :: _) | 99 | (\_ -> _) |
113 | (_rhs (HCons [] (HCons [] HNil))) | 100 | (_rhs (HCons [] (HCons [] HNil))) |
114 | (\(b :: _) (c :: _) -> _rhs | 101 | (\(b :: _) (c :: _) -> _rhs |
115 | \(d := _rhs (split c)) | 102 | \(d := _rhs (split c)) |
116 | (e | 103 | (e |
117 | := _rhs | 104 | := _rhs |
118 | ((\(g :: _) -> hlistConsCase | 105 | ((\(g :: _) -> hlistConsCase |
119 | (_ :: _) | 106 | _ |
120 | (\_ (h :: _) -> hlistConsCase | 107 | (\_ (h :: _) -> hlistConsCase _ (\(i :: _) (j :: _) -> hlistNilCase _ i j) h) |
121 | (_ :: _) | ||
122 | (\(i :: _) (j :: _) -> hlistNilCase (_ :: _) i j) | ||
123 | h) | ||
124 | g) | 108 | g) |
125 | d)) | 109 | d)) |
126 | (f | 110 | (f |
127 | := _rhs | 111 | := _rhs |
128 | ((\(k :: _) -> hlistConsCase | 112 | ((\(k :: _) -> hlistConsCase |
129 | (_ :: _) | 113 | _ |
130 | (\(l :: _) (m :: _) -> hlistConsCase | 114 | (\(l :: _) (m :: _) -> hlistConsCase _ (\_ (n :: _) -> hlistNilCase _ l n) m) |
131 | (_ :: _) | ||
132 | (\_ (n :: _) -> hlistNilCase (_ :: _) l n) | ||
133 | m) | ||
134 | k) | 115 | k) |
135 | d)) -> HCons (b : e) (HCons f HNil)) | 116 | d)) -> HCons (b : e) (HCons f HNil)) |
136 | a | 117 | a |
137 | mergeBy | 118 | mergeBy |
138 | = \(a :: _) (b :: _) (c :: _) -> case'List | 119 | = \(a :: _) (b :: _) (c :: _) -> case'List |
139 | (\_ -> _ :: _) | 120 | (\_ -> _) |
140 | (_rhs c) | 121 | (_rhs c) |
141 | (\(d :: _) (e :: _) -> case'List | 122 | (\(d :: _) (e :: _) -> case'List |
142 | (\_ -> _ :: _) | 123 | (\_ -> _) |
143 | (_rhs b) | 124 | (_rhs b) |
144 | (\(f :: _) (g :: _) -> _rhs | 125 | (\(f :: _) (g :: _) -> _rhs |
145 | ((\(h :: _) -> case'Ordering | 126 | ((\(h :: _) -> case'Ordering |
146 | (\_ -> _ :: _) | 127 | (\_ -> _) |
147 | (d : mergeBy a e (f : g)) | 128 | (d : mergeBy a e (f : g)) |
148 | (f : mergeBy a (d : e) g) | 129 | (f : mergeBy a (d : e) g) |
149 | (f : mergeBy a (d : e) g) | 130 | (f : mergeBy a (d : e) g) |
@@ -153,10 +134,10 @@ mergeBy | |||
153 | b | 134 | b |
154 | sortBy | 135 | sortBy |
155 | = \(a :: _) (b :: _) -> case'List | 136 | = \(a :: _) (b :: _) -> case'List |
156 | (\_ -> _ :: _) | 137 | (\_ -> _) |
157 | (_rhs []) | 138 | (_rhs []) |
158 | (\(c :: _) (d :: _) -> case'List | 139 | (\(c :: _) (d :: _) -> case'List |
159 | (\_ -> _ :: _) | 140 | (\_ -> _) |
160 | (_rhs (c : [])) | 141 | (_rhs (c : [])) |
161 | (\_ _ -> _rhs (uncurry (mergeBy a) ((sortBy a *** sortBy a) (split b)))) | 142 | (\_ _ -> _rhs (uncurry (mergeBy a) ((sortBy a *** sortBy a) (split b)))) |
162 | d) | 143 | d) |
@@ -166,35 +147,35 @@ iterate | |||
166 | :: forall (c :: _) . (c -> c) -> c -> [c] | 147 | :: forall (c :: _) . (c -> c) -> c -> [c] |
167 | fst | 148 | fst |
168 | = \(a :: _) -> hlistConsCase | 149 | = \(a :: _) -> hlistConsCase |
169 | (_ :: _) | 150 | _ |
170 | (\(b :: _) (c :: _) -> hlistConsCase | 151 | (\(b :: _) (c :: _) -> hlistConsCase |
171 | (_ :: _) | 152 | _ |
172 | (\_ (d :: _) -> hlistNilCase (_ :: _) (_rhs b) d) | 153 | (\_ (d :: _) -> hlistNilCase _ (_rhs b) d) |
173 | c) | 154 | c) |
174 | a | 155 | a |
175 | snd | 156 | snd |
176 | = \(a :: _) -> hlistConsCase | 157 | = \(a :: _) -> hlistConsCase |
177 | (_ :: _) | 158 | _ |
178 | (\_ (b :: _) -> hlistConsCase | 159 | (\_ (b :: _) -> hlistConsCase |
179 | (_ :: _) | 160 | _ |
180 | (\(c :: _) (d :: _) -> hlistNilCase (_ :: _) (_rhs c) d) | 161 | (\(c :: _) (d :: _) -> hlistNilCase _ (_rhs c) d) |
181 | b) | 162 | b) |
182 | a | 163 | a |
183 | (|||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _ :: _) (_rhs b) (_rhs True) a | 164 | (|||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs b) (_rhs True) a |
184 | infixr 2 ||| | 165 | infixr 2 ||| |
185 | (&&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _ :: _) (_rhs False) (_rhs b) a | 166 | (&&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs False) (_rhs b) a |
186 | infixr 3 &&& | 167 | infixr 3 &&& |
187 | data RecItem :: Type where | 168 | data RecItem :: Type where |
188 | RecItem :: String -> Type -> RecItem | 169 | RecItem :: String -> Type -> RecItem |
189 | recItemType = \(a :: _) -> case'RecItem (\_ -> _ :: _) (\_ (b :: _) -> _rhs b) a | 170 | recItemType = \(a :: _) -> case'RecItem (\_ -> _) (\_ (b :: _) -> _rhs b) a |
190 | data RecordC (_ :: [RecItem]) :: Type where | 171 | data RecordC (_ :: [RecItem]) :: Type where |
191 | RecordCons :: forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a | 172 | RecordCons :: forall (a :: [RecItem]) . HList (map recItemType a) -> RecordC a |
192 | isKeyC | 173 | isKeyC |
193 | = \(a :: _) (b :: _) (c :: _) -> case'List | 174 | = \(a :: _) (b :: _) (c :: _) -> case'List |
194 | (\_ -> _ :: _) | 175 | (\_ -> _) |
195 | (_rhs ('Empty "")) | 176 | (_rhs ('Empty "")) |
196 | (\(d :: _) (e :: _) -> case'RecItem | 177 | (\(d :: _) (e :: _) -> case'RecItem |
197 | (\_ -> _ :: _) | 178 | (\_ -> _) |
198 | (\(f :: _) (g :: _) -> _rhs | 179 | (\(f :: _) (g :: _) -> _rhs |
199 | (primIfThenElse (a == f) (b `'EqCTt` g) (isKeyC a b e))) | 180 | (primIfThenElse (a == f) (b `'EqCTt` g) (isKeyC a b e))) |
200 | d) | 181 | d) |
@@ -203,14 +184,14 @@ fstTup = _rhs (hlistConsCase (_ :: _) \(a :: _) _ -> a) | |||
203 | sndTup = _rhs (hlistConsCase (_ :: _) \_ (a :: _) -> a) | 184 | sndTup = _rhs (hlistConsCase (_ :: _) \_ (a :: _) -> a) |
204 | project | 185 | project |
205 | = (\ @(a :: _) @(b :: _) (c :: _) @_ (d :: _) -> case'List | 186 | = (\ @(a :: _) @(b :: _) (c :: _) @_ (d :: _) -> case'List |
206 | (\_ -> _ :: _) | 187 | (\_ -> _) |
207 | (_rhs undefined) | 188 | (_rhs undefined) |
208 | (\(e :: _) (f :: _) -> case'RecItem | 189 | (\(e :: _) (f :: _) -> case'RecItem |
209 | (\_ -> _ :: _) | 190 | (\_ -> _) |
210 | (\(g :: _) _ -> case'RecordC | 191 | (\(g :: _) _ -> case'RecordC |
211 | (\_ -> _ :: _) | 192 | (\_ -> _) |
212 | (\(h :: _) -> case'Bool | 193 | (\(h :: _) -> case'Bool |
213 | (\_ -> _ :: _) | 194 | (\_ -> _) |
214 | (_rhs | 195 | (_rhs |
215 | (project | 196 | (project |
216 | @a | 197 | @a |
@@ -454,17 +435,17 @@ lookat | |||
454 | scale = \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0) | 435 | scale = \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0) |
455 | fromTo | 436 | fromTo |
456 | = (\(a :: _) (b :: _) -> case'Bool | 437 | = (\(a :: _) (b :: _) -> case'Bool |
457 | (\_ -> _ :: _) | 438 | (\_ -> _) |
458 | (_rhs (a : fromTo (a + fromInt 1) b)) | 439 | (_rhs (a : fromTo (a + fromInt 1) b)) |
459 | (_rhs []) | 440 | (_rhs []) |
460 | (a > b)) | 441 | (a > b)) |
461 | :: Float -> Float -> [Float] | 442 | :: Float -> Float -> [Float] |
462 | (!!) | 443 | (!!) |
463 | = (\(a :: _) (b :: _) -> case'List | 444 | = (\(a :: _) (b :: _) -> case'List |
464 | (\_ -> _ :: _) | 445 | (\_ -> _) |
465 | (_rhs undefined) | 446 | (_rhs undefined) |
466 | (\(c :: _) (d :: _) -> case'Bool | 447 | (\(c :: _) (d :: _) -> case'Bool |
467 | (\_ -> _ :: _) | 448 | (\_ -> _) |
468 | (_rhs (d !! (b - fromInt 1))) | 449 | (_rhs (d !! (b - fromInt 1))) |
469 | (_rhs c) | 450 | (_rhs c) |
470 | (fromInt 0 == b)) | 451 | (fromInt 0 == b)) |
diff --git a/testdata/ambig.out b/testdata/ambig.out index 00f0bcc8..ce1a76fb 100644 --- a/testdata/ambig.out +++ b/testdata/ambig.out | |||
@@ -4,10 +4,10 @@ h | |||
4 | \(c | 4 | \(c |
5 | := _rhs | 5 | := _rhs |
6 | ((\(d :: _) -> hlistConsCase | 6 | ((\(d :: _) -> hlistConsCase |
7 | (_ :: _) | 7 | _ |
8 | (\(e :: _) (f :: _) -> hlistConsCase | 8 | (\(e :: _) (f :: _) -> hlistConsCase |
9 | (_ :: _) | 9 | _ |
10 | (\(g :: _) (h :: _) -> hlistNilCase (_ :: _) (a e g) h) | 10 | (\(g :: _) (h :: _) -> hlistNilCase _ (a e g) h) |
11 | f) | 11 | f) |
12 | d) | 12 | d) |
13 | b)) -> c | 13 | b)) -> c |
diff --git a/testdata/complex.out b/testdata/complex.out index 2154a46f..fa122fcc 100644 --- a/testdata/complex.out +++ b/testdata/complex.out | |||
@@ -11,17 +11,14 @@ polar | |||
11 | = (\(a :: _) (b :: _) -> _rhs (Complex a b)) :: Float -> Float -> Complex Polar | 11 | = (\(a :: _) (b :: _) -> _rhs (Complex a b)) :: Float -> Float -> Complex Polar |
12 | cabs | 12 | cabs |
13 | = (\ @(a :: _) (b :: _) -> case'Repr | 13 | = (\ @(a :: _) (b :: _) -> case'Repr |
14 | (\_ -> _ :: _) | 14 | (\_ -> _) |
15 | (case'Complex | 15 | (case'Complex (\_ _ -> _) (\(c :: _) (d :: _) -> _rhs (sqrt (c * c + d * d))) b) |
16 | (\_ _ -> _ :: _) | 16 | (case'Complex (\_ _ -> _) (\(e :: _) _ -> _rhs e) b) |
17 | (\(c :: _) (d :: _) -> _rhs (sqrt (c * c + d * d))) | ||
18 | b) | ||
19 | (case'Complex (\_ _ -> _ :: _) (\(e :: _) _ -> _rhs e) b) | ||
20 | a) | 17 | a) |
21 | :: forall (f :: _) . Complex f -> Float | 18 | :: forall (f :: _) . Complex f -> Float |
22 | toPolar | 19 | toPolar |
23 | = (\(a :: _) -> case'Complex | 20 | = (\(a :: _) -> case'Complex |
24 | (\_ _ -> _ :: _) | 21 | (\_ _ -> _) |
25 | (\(b :: _) (c :: _) -> _rhs | 22 | (\(b :: _) (c :: _) -> _rhs |
26 | \(d := _rhs (sqrt (b * b + c * c))) -> primIfThenElse | 23 | \(d := _rhs (sqrt (b * b + c * c))) -> primIfThenElse |
27 | (b > 0.0) | 24 | (b > 0.0) |
@@ -43,21 +40,20 @@ toPolar | |||
43 | :: Complex Normal -> Complex Polar | 40 | :: Complex Normal -> Complex Polar |
44 | toNormal | 41 | toNormal |
45 | = (\(a :: _) -> case'Complex | 42 | = (\(a :: _) -> case'Complex |
46 | (\_ _ -> _ :: _) | 43 | (\_ _ -> _) |
47 | (\(b :: _) (c :: _) -> _rhs (Complex (b * cos c) (b * sin c))) | 44 | (\(b :: _) (c :: _) -> _rhs (Complex (b * cos c) (b * sin c))) |
48 | a) | 45 | a) |
49 | :: Complex Polar -> Complex Normal | 46 | :: Complex Polar -> Complex Normal |
50 | it_should_fail | 47 | it_should_fail = \(a :: _) -> case'Complex (\_ _ -> _) (\(b :: _) _ -> _rhs b) a |
51 | = \(a :: _) -> case'Complex (\_ _ -> _ :: _) (\(b :: _) _ -> _rhs b) a | ||
52 | add | 48 | add |
53 | = (\ @(a :: _) @(b :: _) (c :: _) (d :: _) -> case'Repr | 49 | = (\ @(a :: _) @(b :: _) (c :: _) (d :: _) -> case'Repr |
54 | (\_ -> _ :: _) | 50 | (\_ -> _) |
55 | (case'Repr | 51 | (case'Repr |
56 | (\_ -> _ :: _) | 52 | (\_ -> _) |
57 | (case'Complex | 53 | (case'Complex |
58 | (\_ _ -> _ :: _) | 54 | (\_ _ -> _) |
59 | (\(e :: _) (f :: _) -> case'Complex | 55 | (\(e :: _) (f :: _) -> case'Complex |
60 | (\_ _ -> _ :: _) | 56 | (\_ _ -> _) |
61 | (\(g :: _) (h :: _) -> _rhs (Complex (e + g) (f + h))) | 57 | (\(g :: _) (h :: _) -> _rhs (Complex (e + g) (f + h))) |
62 | d) | 58 | d) |
63 | c) | 59 | c) |
@@ -68,13 +64,13 @@ add | |||
68 | :: forall (i :: _) (j :: _) . Complex i -> Complex j -> Complex i | 64 | :: forall (i :: _) (j :: _) . Complex i -> Complex j -> Complex i |
69 | mul | 65 | mul |
70 | = (\ @(a :: _) @(b :: _) (c :: _) (d :: _) -> case'Repr | 66 | = (\ @(a :: _) @(b :: _) (c :: _) (d :: _) -> case'Repr |
71 | (\_ -> _ :: _) | 67 | (\_ -> _) |
72 | (case'Repr | 68 | (case'Repr |
73 | (\_ -> _ :: _) | 69 | (\_ -> _) |
74 | (case'Complex | 70 | (case'Complex |
75 | (\_ _ -> _ :: _) | 71 | (\_ _ -> _) |
76 | (\(e :: _) (f :: _) -> case'Complex | 72 | (\(e :: _) (f :: _) -> case'Complex |
77 | (\_ _ -> _ :: _) | 73 | (\_ _ -> _) |
78 | (\(g :: _) (h :: _) -> _rhs (Complex (e * g - f * h) (f * g + e * h))) | 74 | (\(g :: _) (h :: _) -> _rhs (Complex (e * g - f * h) (f * g + e * h))) |
79 | d) | 75 | d) |
80 | c) | 76 | c) |
diff --git a/testdata/data.out b/testdata/data.out index ae819782..d1952aed 100644 --- a/testdata/data.out +++ b/testdata/data.out | |||
@@ -10,7 +10,7 @@ data Data2 :: Type where | |||
10 | Data24 :: Data2 | 10 | Data24 :: Data2 |
11 | x | 11 | x |
12 | = \(a :: _) -> case'Data2 | 12 | = \(a :: _) -> case'Data2 |
13 | (\_ -> _ :: _) | 13 | (\_ -> _) |
14 | (\_ -> _rhs undefined) | 14 | (\_ -> _rhs undefined) |
15 | (\(b :: _) _ -> _rhs b) | 15 | (\(b :: _) _ -> _rhs b) |
16 | (\(c :: _) -> _rhs c) | 16 | (\(c :: _) -> _rhs c) |
@@ -18,7 +18,7 @@ x | |||
18 | a | 18 | a |
19 | y | 19 | y |
20 | = \(a :: _) -> case'Data2 | 20 | = \(a :: _) -> case'Data2 |
21 | (\_ -> _ :: _) | 21 | (\_ -> _) |
22 | (\_ -> _rhs undefined) | 22 | (\_ -> _rhs undefined) |
23 | (\_ (b :: _) -> _rhs b) | 23 | (\_ (b :: _) -> _rhs b) |
24 | (\_ -> _rhs undefined) | 24 | (\_ -> _rhs undefined) |
@@ -30,21 +30,21 @@ data Data5 (_ :: Type) (_ :: Type) (_ :: Type) :: Type where | |||
30 | Data53 :: forall g h i . Int -> g -> Float -> h -> i -> Data5 g h i | 30 | Data53 :: forall g h i . Int -> g -> Float -> h -> i -> Data5 g h i |
31 | a5 | 31 | a5 |
32 | = \(a :: _) -> case'Data5 | 32 | = \(a :: _) -> case'Data5 |
33 | (\_ -> _ :: _) | 33 | (\_ -> _) |
34 | (\(b :: _) -> _rhs b) | 34 | (\(b :: _) -> _rhs b) |
35 | (\(c :: _) _ _ -> _rhs c) | 35 | (\(c :: _) _ _ -> _rhs c) |
36 | (\_ _ _ _ _ -> _rhs undefined) | 36 | (\_ _ _ _ _ -> _rhs undefined) |
37 | a | 37 | a |
38 | b5 | 38 | b5 |
39 | = \(a :: _) -> case'Data5 | 39 | = \(a :: _) -> case'Data5 |
40 | (\_ -> _ :: _) | 40 | (\_ -> _) |
41 | (\_ -> _rhs undefined) | 41 | (\_ -> _rhs undefined) |
42 | (\_ (b :: _) _ -> _rhs b) | 42 | (\_ (b :: _) _ -> _rhs b) |
43 | (\_ _ _ _ _ -> _rhs undefined) | 43 | (\_ _ _ _ _ -> _rhs undefined) |
44 | a | 44 | a |
45 | c5 | 45 | c5 |
46 | = \(a :: _) -> case'Data5 | 46 | = \(a :: _) -> case'Data5 |
47 | (\_ -> _ :: _) | 47 | (\_ -> _) |
48 | (\_ -> _rhs undefined) | 48 | (\_ -> _rhs undefined) |
49 | (\_ _ (b :: _) -> _rhs b) | 49 | (\_ _ (b :: _) -> _rhs b) |
50 | (\_ _ _ _ _ -> _rhs undefined) | 50 | (\_ _ _ _ _ -> _rhs undefined) |
diff --git a/testdata/language-features/basic-list/listcomp09.out b/testdata/language-features/basic-list/listcomp09.out index 27afb045..96351e61 100644 --- a/testdata/language-features/basic-list/listcomp09.out +++ b/testdata/language-features/basic-list/listcomp09.out | |||
@@ -1,7 +1,6 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value1 | 2 | value1 |
3 | = _rhs | 3 | = _rhs (concatMap (\_ -> (\(a :: _) -> hlistNilCase _ "Hello" a) : []) []) |
4 | (concatMap (\_ -> (\(a :: _) -> hlistNilCase (_ :: _) "Hello" a) : []) []) | ||
5 | main is not found | 4 | main is not found |
6 | ------------ trace | 5 | ------------ trace |
7 | value1 :: Type => [() -> String] | 6 | value1 :: Type => [() -> String] |
diff --git a/testdata/language-features/basic-values/case01.out b/testdata/language-features/basic-values/case01.out index 75dc7af3..8b4334e6 100644 --- a/testdata/language-features/basic-values/case01.out +++ b/testdata/language-features/basic-values/case01.out | |||
@@ -1,9 +1,9 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value1 = _rhs ((\(a :: _) -> hlistNilCase (_ :: _) HNil a) HNil) | 2 | value1 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
3 | value2 = _rhs ((\(a :: _) -> hlistNilCase (_ :: _) HNil a) HNil) | 3 | value2 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
4 | value3 = _rhs ((\(a :: _) -> hlistNilCase (_ :: _) HNil a) HNil) | 4 | value3 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
5 | value4 = _rhs ((\(a :: _) -> hlistNilCase (_ :: _) HNil a) HNil) | 5 | value4 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
6 | value5 = _rhs ((\(a :: _) -> hlistNilCase (_ :: _) HNil a) HNil) | 6 | value5 = _rhs ((\(a :: _) -> hlistNilCase _ HNil a) HNil) |
7 | value6 = _rhs ((\_ -> HNil) HNil) | 7 | value6 = _rhs ((\_ -> HNil) HNil) |
8 | main is not found | 8 | main is not found |
9 | ------------ trace | 9 | ------------ trace |
diff --git a/testdata/language-features/basic-values/case02.out b/testdata/language-features/basic-values/case02.out index c762c3fe..a5f57070 100644 --- a/testdata/language-features/basic-values/case02.out +++ b/testdata/language-features/basic-values/case02.out | |||
@@ -1,12 +1,12 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value1 | 2 | value1 |
3 | = _rhs | 3 | = _rhs |
4 | ((\(a :: _) -> case'Bool (\_ -> _ :: _) HNil HNil (fromInt 1 == a)) (fromInt 1)) | 4 | ((\(a :: _) -> case'Bool (\_ -> _) HNil HNil (fromInt 1 == a)) (fromInt 1)) |
5 | value2 | 5 | value2 |
6 | = _rhs | 6 | = _rhs |
7 | ((\(a :: _) -> case'Bool | 7 | ((\(a :: _) -> case'Bool |
8 | (\_ -> _ :: _) | 8 | (\_ -> _) |
9 | (case'Bool (\_ -> _ :: _) "_" "2" (fromInt 2 == a)) | 9 | (case'Bool (\_ -> _) "_" "2" (fromInt 2 == a)) |
10 | "1" | 10 | "1" |
11 | (fromInt 1 == a)) | 11 | (fromInt 1 == a)) |
12 | (fromInt 2)) | 12 | (fromInt 2)) |
diff --git a/testdata/language-features/basic-values/case05.out b/testdata/language-features/basic-values/case05.out index 5021dfc3..e099d30d 100644 --- a/testdata/language-features/basic-values/case05.out +++ b/testdata/language-features/basic-values/case05.out | |||
@@ -1,7 +1,7 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value | 2 | value |
3 | = \(a :: _) -> _rhs | 3 | = \(a :: _) -> _rhs |
4 | ((\(b :: _) -> case'Bool (\_ -> _ :: _) undefined '1' (fromInt 1 == b)) a) | 4 | ((\(b :: _) -> case'Bool (\_ -> _) undefined '1' (fromInt 1 == b)) a) |
5 | main is not found | 5 | main is not found |
6 | ------------ trace | 6 | ------------ trace |
7 | value :: forall a . (Eq a, Num a) => a -> Char | 7 | value :: forall a . (Eq a, Num a) => a -> Char |
diff --git a/testdata/language-features/basic-values/case06.out b/testdata/language-features/basic-values/case06.out index ca1b9d5e..aaeff605 100644 --- a/testdata/language-features/basic-values/case06.out +++ b/testdata/language-features/basic-values/case06.out | |||
@@ -1,7 +1,7 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value | 2 | value |
3 | = \(a :: _) -> _rhs | 3 | = \(a :: _) -> _rhs |
4 | ((\(b :: _) -> case'Bool (\_ -> _ :: _) '_' '1' (fromInt 1 == b)) a) | 4 | ((\(b :: _) -> case'Bool (\_ -> _) '_' '1' (fromInt 1 == b)) a) |
5 | main is not found | 5 | main is not found |
6 | ------------ trace | 6 | ------------ trace |
7 | value :: forall a . (Eq a, Num a) => a -> Char | 7 | value :: forall a . (Eq a, Num a) => a -> Char |
diff --git a/testdata/language-features/basic-values/def03.out b/testdata/language-features/basic-values/def03.out index 726a2061..ceb6a8e1 100644 --- a/testdata/language-features/basic-values/def03.out +++ b/testdata/language-features/basic-values/def03.out | |||
@@ -1,8 +1,8 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | fun | 2 | fun |
3 | = \(a :: _) -> case'Bool | 3 | = \(a :: _) -> case'Bool |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (case'Bool (\_ -> _ :: _) (_rhs undefined) (_rhs '2') (fromInt 2 == a)) | 5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs '2') (fromInt 2 == a)) |
6 | (_rhs '1') | 6 | (_rhs '1') |
7 | (fromInt 1 == a) | 7 | (fromInt 1 == a) |
8 | main is not found | 8 | main is not found |
diff --git a/testdata/language-features/basic-values/def04.out b/testdata/language-features/basic-values/def04.out index 18c66ed9..e52f9d64 100644 --- a/testdata/language-features/basic-values/def04.out +++ b/testdata/language-features/basic-values/def04.out | |||
@@ -1,14 +1,14 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | fun | 2 | fun |
3 | = \(a :: _) -> case'Bool | 3 | = \(a :: _) -> case'Bool |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (case'Bool (\_ -> _ :: _) (_rhs '_') (_rhs '2') (fromInt 2 == a)) | 5 | (case'Bool (\_ -> _) (_rhs '_') (_rhs '2') (fromInt 2 == a)) |
6 | (_rhs '1') | 6 | (_rhs '1') |
7 | (fromInt 1 == a) | 7 | (fromInt 1 == a) |
8 | fun2 | 8 | fun2 |
9 | = \(a :: _) _ -> case'Bool | 9 | = \(a :: _) _ -> case'Bool |
10 | (\_ -> _ :: _) | 10 | (\_ -> _) |
11 | (case'Bool (\_ -> _ :: _) (_rhs '_') (_rhs '2') (fromInt 2 == a)) | 11 | (case'Bool (\_ -> _) (_rhs '_') (_rhs '2') (fromInt 2 == a)) |
12 | (_rhs '1') | 12 | (_rhs '1') |
13 | (fromInt 1 == a) | 13 | (fromInt 1 == a) |
14 | main is not found | 14 | main is not found |
diff --git a/testdata/language-features/basic-values/typesyn02.out b/testdata/language-features/basic-values/typesyn02.out index 8f8e7892..44bc99c8 100644 --- a/testdata/language-features/basic-values/typesyn02.out +++ b/testdata/language-features/basic-values/typesyn02.out | |||
@@ -1,7 +1,7 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | 'MyUnit = _rhs ('HList []) | 2 | 'MyUnit = _rhs ('HList []) |
3 | fun | 3 | fun |
4 | = (\_ (a :: _) -> hlistNilCase (_ :: _) (_rhs HNil) a) | 4 | = (\_ (a :: _) -> hlistNilCase _ (_rhs HNil) a) |
5 | :: forall (b :: _) . b -> MyUnit -> MyUnit | 5 | :: forall (b :: _) . b -> MyUnit -> MyUnit |
6 | main is not found | 6 | main is not found |
7 | ------------ trace | 7 | ------------ trace |
diff --git a/testdata/language-features/basic-values/where05.out b/testdata/language-features/basic-values/where05.out index d11a4dbc..8c082555 100644 --- a/testdata/language-features/basic-values/where05.out +++ b/testdata/language-features/basic-values/where05.out | |||
@@ -2,7 +2,7 @@ | |||
2 | value1 | 2 | value1 |
3 | = _rhs | 3 | = _rhs |
4 | ((\(a :: _) -> case'Bool | 4 | ((\(a :: _) -> case'Bool |
5 | (\_ -> _ :: _) | 5 | (\_ -> _) |
6 | HNil | 6 | HNil |
7 | (\(b := _rhs HNil) -> b) | 7 | (\(b := _rhs HNil) -> b) |
8 | (fromInt 1 == a)) | 8 | (fromInt 1 == a)) |
@@ -10,7 +10,7 @@ value1 | |||
10 | value2 | 10 | value2 |
11 | = _rhs | 11 | = _rhs |
12 | ((\(a :: _) -> case'Bool | 12 | ((\(a :: _) -> case'Bool |
13 | (\_ -> _ :: _) | 13 | (\_ -> _) |
14 | HNil | 14 | HNil |
15 | (\(b := _rhs HNil) -> b) | 15 | (\(b := _rhs HNil) -> b) |
16 | (fromInt 1 == a)) | 16 | (fromInt 1 == a)) |
@@ -18,18 +18,14 @@ value2 | |||
18 | value3 | 18 | value3 |
19 | = _rhs | 19 | = _rhs |
20 | ((\(a :: _) -> case'Bool | 20 | ((\(a :: _) -> case'Bool |
21 | (\_ -> _ :: _) | 21 | (\_ -> _) |
22 | HNil | 22 | HNil |
23 | (\(b := _rhs HNil) -> b) | 23 | (\(b := _rhs HNil) -> b) |
24 | (fromInt 1 == a)) | 24 | (fromInt 1 == a)) |
25 | (fromInt 1)) | 25 | (fromInt 1)) |
26 | value4 | 26 | value4 |
27 | = _rhs | 27 | = _rhs |
28 | \(a := _rhs HNil) -> (\(b :: _) -> case'Bool | 28 | \(a := _rhs HNil) -> (\(b :: _) -> case'Bool (\_ -> _) HNil a (fromInt 1 == b)) |
29 | (\_ -> _ :: _) | ||
30 | HNil | ||
31 | a | ||
32 | (fromInt 1 == b)) | ||
33 | (fromInt 1) | 29 | (fromInt 1) |
34 | main is not found | 30 | main is not found |
35 | ------------ trace | 31 | ------------ trace |
diff --git a/testdata/language-features/guard/guard01.out b/testdata/language-features/guard/guard01.out index e042cf51..b4195756 100644 --- a/testdata/language-features/guard/guard01.out +++ b/testdata/language-features/guard/guard01.out | |||
@@ -1,5 +1,5 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value = case'Bool (\_ -> _ :: _) (_rhs undefined) (_rhs HNil) True | 2 | value = case'Bool (\_ -> _) (_rhs undefined) (_rhs HNil) True |
3 | main is not found | 3 | main is not found |
4 | ------------ trace | 4 | ------------ trace |
5 | value :: () | 5 | value :: () |
diff --git a/testdata/language-features/guard/guard03.out b/testdata/language-features/guard/guard03.out index c7cfc230..7d7f8a4d 100644 --- a/testdata/language-features/guard/guard03.out +++ b/testdata/language-features/guard/guard03.out | |||
@@ -1,8 +1,8 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value | 2 | value |
3 | = case'Bool | 3 | = case'Bool |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (case'Bool (\_ -> _ :: _) (_rhs undefined) (_rhs "False") False) | 5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) |
6 | (_rhs "True") | 6 | (_rhs "True") |
7 | True | 7 | True |
8 | main is not found | 8 | main is not found |
diff --git a/testdata/language-features/guard/guard04.out b/testdata/language-features/guard/guard04.out index 35a1df34..21a9ff19 100644 --- a/testdata/language-features/guard/guard04.out +++ b/testdata/language-features/guard/guard04.out | |||
@@ -1,5 +1,5 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value = case'Bool (\_ -> _ :: _) (_rhs "False") (_rhs "True") True | 2 | value = case'Bool (\_ -> _) (_rhs "False") (_rhs "True") True |
3 | main is not found | 3 | main is not found |
4 | ------------ trace | 4 | ------------ trace |
5 | value :: String | 5 | value :: String |
diff --git a/testdata/language-features/guard/guard07.out b/testdata/language-features/guard/guard07.out index 8b2af531..acc704ba 100644 --- a/testdata/language-features/guard/guard07.out +++ b/testdata/language-features/guard/guard07.out | |||
@@ -1,8 +1,8 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value | 2 | value |
3 | = case'Bool | 3 | = case'Bool |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (case'Bool (\_ -> _ :: _) (_rhs undefined) (_rhs "False") False) | 5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) |
6 | (_rhs "True") | 6 | (_rhs "True") |
7 | True | 7 | True |
8 | main is not found | 8 | main is not found |
diff --git a/testdata/language-features/guard/guard08.out b/testdata/language-features/guard/guard08.out index 47b29db9..eeef1da6 100644 --- a/testdata/language-features/guard/guard08.out +++ b/testdata/language-features/guard/guard08.out | |||
@@ -1,8 +1,8 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value | 2 | value |
3 | = case'Bool | 3 | = case'Bool |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (case'Bool (\_ -> _ :: _) (_rhs undefined) (_rhs "False") False) | 5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) |
6 | (_rhs "True") | 6 | (_rhs "True") |
7 | True | 7 | True |
8 | main is not found | 8 | main is not found |
diff --git a/testdata/language-features/guard/guard09.out b/testdata/language-features/guard/guard09.out index aa6d848f..09a72fa0 100644 --- a/testdata/language-features/guard/guard09.out +++ b/testdata/language-features/guard/guard09.out | |||
@@ -1,8 +1,8 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value | 2 | value |
3 | = case'Bool | 3 | = case'Bool |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (case'Bool (\_ -> _ :: _) (_rhs undefined) (_rhs "False") False) | 5 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs "False") False) |
6 | (_rhs "True") | 6 | (_rhs "True") |
7 | True | 7 | True |
8 | main is not found | 8 | main is not found |
diff --git a/testdata/language-features/guard/guard11.out b/testdata/language-features/guard/guard11.out index 47bd37ad..1d173fb2 100644 --- a/testdata/language-features/guard/guard11.out +++ b/testdata/language-features/guard/guard11.out | |||
@@ -1,5 +1,5 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | fun = \(a :: _) -> case'Bool (\_ -> _ :: _) (_rhs "False") (_rhs "True") a | 2 | fun = \(a :: _) -> case'Bool (\_ -> _) (_rhs "False") (_rhs "True") a |
3 | main is not found | 3 | main is not found |
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: Bool -> String | 5 | fun :: Bool -> String |
diff --git a/testdata/language-features/guard/guard13.out b/testdata/language-features/guard/guard13.out index 65411e87..e8bd4c84 100644 --- a/testdata/language-features/guard/guard13.out +++ b/testdata/language-features/guard/guard13.out | |||
@@ -1,5 +1,5 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | fun = \(a :: _) -> case'Bool (\_ -> _ :: _) (_rhs HNil) (_rhs HNil) a | 2 | fun = \(a :: _) -> case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) a |
3 | main is not found | 3 | main is not found |
4 | ------------ trace | 4 | ------------ trace |
5 | fun :: Bool -> () | 5 | fun :: Bool -> () |
diff --git a/testdata/language-features/guard/guard14.out b/testdata/language-features/guard/guard14.out index 05321956..e0b32348 100644 --- a/testdata/language-features/guard/guard14.out +++ b/testdata/language-features/guard/guard14.out | |||
@@ -1,6 +1,5 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value | 2 | value = _rhs \(a := case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) True) -> HNil |
3 | = _rhs \(a := case'Bool (\_ -> _ :: _) (_rhs HNil) (_rhs HNil) True) -> HNil | ||
4 | main is not found | 3 | main is not found |
5 | ------------ trace | 4 | ------------ trace |
6 | value :: () | 5 | value :: () |
diff --git a/testdata/language-features/guard/guard15.out b/testdata/language-features/guard/guard15.out index 50452c29..733c2b34 100644 --- a/testdata/language-features/guard/guard15.out +++ b/testdata/language-features/guard/guard15.out | |||
@@ -1,6 +1,5 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | value | 2 | value = _rhs \(a := case'Bool (\_ -> _) (_rhs HNil) (_rhs HNil) True) -> HNil |
3 | = _rhs \(a := case'Bool (\_ -> _ :: _) (_rhs HNil) (_rhs HNil) True) -> HNil | ||
4 | main is not found | 3 | main is not found |
5 | ------------ trace | 4 | ------------ trace |
6 | value :: () | 5 | value :: () |
diff --git a/testdata/language-features/guard/guard16.out b/testdata/language-features/guard/guard16.out index 710f1ae9..4fc90e30 100644 --- a/testdata/language-features/guard/guard16.out +++ b/testdata/language-features/guard/guard16.out | |||
@@ -2,9 +2,9 @@ | |||
2 | value | 2 | value |
3 | = _rhs | 3 | = _rhs |
4 | ((\(a :: _) -> case'Bool | 4 | ((\(a :: _) -> case'Bool |
5 | (\_ -> _ :: _) | 5 | (\_ -> _) |
6 | HNil | 6 | HNil |
7 | (case'Bool (\_ -> _ :: _) HNil HNil True) | 7 | (case'Bool (\_ -> _) HNil HNil True) |
8 | (fromInt 1 == a)) | 8 | (fromInt 1 == a)) |
9 | (fromInt 1)) | 9 | (fromInt 1)) |
10 | main is not found | 10 | main is not found |
diff --git a/testdata/language-features/module/import09.out b/testdata/language-features/module/import09.out index 790fbf72..e7df6502 100644 --- a/testdata/language-features/module/import09.out +++ b/testdata/language-features/module/import09.out | |||
@@ -1,6 +1,6 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | fun | 2 | fun |
3 | = (\_ (a :: _) -> hlistNilCase (_ :: _) (_rhs HNil) a) | 3 | = (\_ (a :: _) -> hlistNilCase _ (_rhs HNil) a) |
4 | :: forall (b :: _) . b -> MyUnit -> MyUnit | 4 | :: forall (b :: _) . b -> MyUnit -> MyUnit |
5 | main is not found | 5 | main is not found |
6 | ------------ trace | 6 | ------------ trace |
diff --git a/testdata/language-features/pattern/pattern01.out b/testdata/language-features/pattern/pattern01.out index 7679e35c..1683fdec 100644 --- a/testdata/language-features/pattern/pattern01.out +++ b/testdata/language-features/pattern/pattern01.out | |||
@@ -1,9 +1,8 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | fun1 | 2 | fun1 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') (fromInt 0 == a) |
3 | = \(a :: _) -> case'Bool (\_ -> _ :: _) (_rhs '_') (_rhs '0') (fromInt 0 == a) | 3 | fun2 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') ("0" == a) |
4 | fun2 = \(a :: _) -> case'Bool (\_ -> _ :: _) (_rhs '_') (_rhs '0') ("0" == a) | 4 | fun3 = \(a :: _) -> case'Bool (\_ -> _) (_rhs '_') (_rhs '0') ('0' == a) |
5 | fun3 = \(a :: _) -> case'Bool (\_ -> _ :: _) (_rhs '_') (_rhs '0') ('0' == a) | 5 | fun4 = \(a :: _) -> hlistNilCase _ (_rhs '0') a |
6 | fun4 = \(a :: _) -> hlistNilCase (_ :: _) (_rhs '0') a | ||
7 | main is not found | 6 | main is not found |
8 | ------------ trace | 7 | ------------ trace |
9 | fun1 :: forall a . (Eq a, Num a) => a -> Char | 8 | fun1 :: forall a . (Eq a, Num a) => a -> Char |
diff --git a/testdata/language-features/pattern/uncovered.out b/testdata/language-features/pattern/uncovered.out index 9af16a3f..531a913a 100644 --- a/testdata/language-features/pattern/uncovered.out +++ b/testdata/language-features/pattern/uncovered.out | |||
@@ -1,37 +1,37 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | f | 2 | f |
3 | = \(a :: _) (b :: _) (c :: _) -> case'Bool | 3 | = \(a :: _) (b :: _) (c :: _) -> case'Bool |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (case'Bool | 5 | (case'Bool |
6 | (\_ -> _ :: _) | 6 | (\_ -> _) |
7 | (case'Bool (\_ -> _ :: _) (_rhs undefined) (_rhs (fromInt 1)) c) | 7 | (case'Bool (\_ -> _) (_rhs undefined) (_rhs (fromInt 1)) c) |
8 | (_rhs (fromInt 2)) | 8 | (_rhs (fromInt 2)) |
9 | a) | 9 | a) |
10 | (case'Bool | 10 | (case'Bool |
11 | (\_ -> _ :: _) | 11 | (\_ -> _) |
12 | (_rhs (fromInt 0)) | 12 | (_rhs (fromInt 0)) |
13 | (case'Bool (\_ -> _ :: _) (_rhs (fromInt 1)) (_rhs undefined) a) | 13 | (case'Bool (\_ -> _) (_rhs (fromInt 1)) (_rhs undefined) a) |
14 | c) | 14 | c) |
15 | b | 15 | b |
16 | g | 16 | g |
17 | = \(a :: _) -> case'List | 17 | = \(a :: _) -> case'List |
18 | (\_ -> _ :: _) | 18 | (\_ -> _) |
19 | (_rhs undefined) | 19 | (_rhs undefined) |
20 | (\(b :: _) (c :: _) -> case'Bool | 20 | (\(b :: _) (c :: _) -> case'Bool |
21 | (\_ -> _ :: _) | 21 | (\_ -> _) |
22 | (_rhs undefined) | 22 | (_rhs undefined) |
23 | (case'List | 23 | (case'List |
24 | (\_ -> _ :: _) | 24 | (\_ -> _) |
25 | (_rhs undefined) | 25 | (_rhs undefined) |
26 | (\(d :: _) (e :: _) -> case'Bool | 26 | (\(d :: _) (e :: _) -> case'Bool |
27 | (\_ -> _ :: _) | 27 | (\_ -> _) |
28 | (case'List | 28 | (case'List |
29 | (\_ -> _ :: _) | 29 | (\_ -> _) |
30 | (_rhs undefined) | 30 | (_rhs undefined) |
31 | (\(f :: _) (g :: _) -> case'Bool | 31 | (\(f :: _) (g :: _) -> case'Bool |
32 | (\_ -> _ :: _) | 32 | (\_ -> _) |
33 | (_rhs undefined) | 33 | (_rhs undefined) |
34 | (case'List (\_ -> _ :: _) (_rhs False) (\_ _ -> _rhs undefined) g) | 34 | (case'List (\_ -> _) (_rhs False) (\_ _ -> _rhs undefined) g) |
35 | f) | 35 | f) |
36 | e) | 36 | e) |
37 | (_rhs undefined) | 37 | (_rhs undefined) |
@@ -41,27 +41,27 @@ g | |||
41 | a | 41 | a |
42 | h | 42 | h |
43 | = \(a :: _) -> case'List | 43 | = \(a :: _) -> case'List |
44 | (\_ -> _ :: _) | 44 | (\_ -> _) |
45 | (_rhs undefined) | 45 | (_rhs undefined) |
46 | (\(b :: _) (c :: _) -> case'List | 46 | (\(b :: _) (c :: _) -> case'List |
47 | (\_ -> _ :: _) | 47 | (\_ -> _) |
48 | (_rhs undefined) | 48 | (_rhs undefined) |
49 | (\(d :: _) (e :: _) -> case'Bool | 49 | (\(d :: _) (e :: _) -> case'Bool |
50 | (\_ -> _ :: _) | 50 | (\_ -> _) |
51 | (_rhs undefined) | 51 | (_rhs undefined) |
52 | (case'List | 52 | (case'List |
53 | (\_ -> _ :: _) | 53 | (\_ -> _) |
54 | (case'List | 54 | (case'List |
55 | (\_ -> _ :: _) | 55 | (\_ -> _) |
56 | (_rhs undefined) | 56 | (_rhs undefined) |
57 | (\(f :: _) (g :: _) -> case'List | 57 | (\(f :: _) (g :: _) -> case'List |
58 | (\_ -> _ :: _) | 58 | (\_ -> _) |
59 | (_rhs undefined) | 59 | (_rhs undefined) |
60 | (\(h :: _) (i :: _) -> case'Bool | 60 | (\(h :: _) (i :: _) -> case'Bool |
61 | (\_ -> _ :: _) | 61 | (\_ -> _) |
62 | (case'List | 62 | (case'List |
63 | (\_ -> _ :: _) | 63 | (\_ -> _) |
64 | (case'List (\_ -> _ :: _) (_rhs True) (\_ _ -> _rhs undefined) g) | 64 | (case'List (\_ -> _) (_rhs True) (\_ _ -> _rhs undefined) g) |
65 | (\_ _ -> _rhs undefined) | 65 | (\_ _ -> _rhs undefined) |
66 | i) | 66 | i) |
67 | (_rhs undefined) | 67 | (_rhs undefined) |
diff --git a/testdata/language-features/recursion/simplerec01.out b/testdata/language-features/recursion/simplerec01.out index e264622f..89006870 100644 --- a/testdata/language-features/recursion/simplerec01.out +++ b/testdata/language-features/recursion/simplerec01.out | |||
@@ -1,7 +1,7 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | fun | 2 | fun |
3 | = \(a :: _) -> case'Bool | 3 | = \(a :: _) -> case'Bool |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (_rhs (fun (fromInt 0))) | 5 | (_rhs (fun (fromInt 0))) |
6 | (_rhs 'a') | 6 | (_rhs 'a') |
7 | (fromInt 0 == a) | 7 | (fromInt 0 == a) |
diff --git a/testdata/language-features/recursion/simplerec02.out b/testdata/language-features/recursion/simplerec02.out index 4e95a85e..7f24ea1c 100644 --- a/testdata/language-features/recursion/simplerec02.out +++ b/testdata/language-features/recursion/simplerec02.out | |||
@@ -4,7 +4,7 @@ value | |||
4 | \(a | 4 | \(a |
5 | := primFix | 5 | := primFix |
6 | \(b :: _) (c :: _) -> case'Bool | 6 | \(b :: _) (c :: _) -> case'Bool |
7 | (\_ -> _ :: _) | 7 | (\_ -> _) |
8 | (_rhs (b (fromInt 0))) | 8 | (_rhs (b (fromInt 0))) |
9 | (_rhs 'a') | 9 | (_rhs 'a') |
10 | (fromInt 0 == c)) -> HNil | 10 | (fromInt 0 == c)) -> HNil |
diff --git a/testdata/language-features/recursion/simplerec03.out b/testdata/language-features/recursion/simplerec03.out index 9bdd104f..512baba5 100644 --- a/testdata/language-features/recursion/simplerec03.out +++ b/testdata/language-features/recursion/simplerec03.out | |||
@@ -4,7 +4,7 @@ value | |||
4 | \(a | 4 | \(a |
5 | := primFix | 5 | := primFix |
6 | \(b :: _) (c :: _) -> case'Bool | 6 | \(b :: _) (c :: _) -> case'Bool |
7 | (\_ -> _ :: _) | 7 | (\_ -> _) |
8 | (_rhs (b (fromInt 0))) | 8 | (_rhs (b (fromInt 0))) |
9 | (_rhs 'a') | 9 | (_rhs 'a') |
10 | (fromInt 0 == c)) -> HNil | 10 | (fromInt 0 == c)) -> HNil |
diff --git a/testdata/performance/Material.out b/testdata/performance/Material.out index 76e3c20c..ea52e563 100644 --- a/testdata/performance/Material.out +++ b/testdata/performance/Material.out | |||
@@ -5,14 +5,11 @@ data Entity :: Type where | |||
5 | :: Vec (fromInt 4) Float | 5 | :: Vec (fromInt 4) Float |
6 | -> Vec (fromInt 4) Float | 6 | -> Vec (fromInt 4) Float |
7 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity | 7 | -> Vec (fromInt 3) Float -> Vec (fromInt 4) Float -> Entity |
8 | eAmbientLight | 8 | eAmbientLight = \(a :: _) -> case'Entity (\_ -> _) (\(b :: _) _ _ _ -> _rhs b) a |
9 | = \(a :: _) -> case'Entity (\_ -> _ :: _) (\(b :: _) _ _ _ -> _rhs b) a | ||
10 | eDirectedLight | 9 | eDirectedLight |
11 | = \(a :: _) -> case'Entity (\_ -> _ :: _) (\_ (b :: _) _ _ -> _rhs b) a | 10 | = \(a :: _) -> case'Entity (\_ -> _) (\_ (b :: _) _ _ -> _rhs b) a |
12 | eLightDir | 11 | eLightDir = \(a :: _) -> case'Entity (\_ -> _) (\_ _ (b :: _) _ -> _rhs b) a |
13 | = \(a :: _) -> case'Entity (\_ -> _ :: _) (\_ _ (b :: _) _ -> _rhs b) a | 12 | eShaderRGBA = \(a :: _) -> case'Entity (\_ -> _) (\_ _ _ (b :: _) -> _rhs b) a |
14 | eShaderRGBA | ||
15 | = \(a :: _) -> case'Entity (\_ -> _ :: _) (\_ _ _ (b :: _) -> _rhs b) a | ||
16 | data WaveType :: Type where | 13 | data WaveType :: Type where |
17 | WT_Sin :: WaveType | 14 | WT_Sin :: WaveType |
18 | WT_Triangle :: WaveType | 15 | WT_Triangle :: WaveType |
@@ -114,57 +111,57 @@ data StageAttrs :: Type where | |||
114 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs | 111 | -> Bool -> DepthFunction -> Maybe AlphaFunction -> Bool -> String -> StageAttrs |
115 | saBlend | 112 | saBlend |
116 | = \(a :: _) -> case'StageAttrs | 113 | = \(a :: _) -> case'StageAttrs |
117 | (\_ -> _ :: _) | 114 | (\_ -> _) |
118 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 115 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
119 | a | 116 | a |
120 | saRGBGen | 117 | saRGBGen |
121 | = \(a :: _) -> case'StageAttrs | 118 | = \(a :: _) -> case'StageAttrs |
122 | (\_ -> _ :: _) | 119 | (\_ -> _) |
123 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 120 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
124 | a | 121 | a |
125 | saAlphaGen | 122 | saAlphaGen |
126 | = \(a :: _) -> case'StageAttrs | 123 | = \(a :: _) -> case'StageAttrs |
127 | (\_ -> _ :: _) | 124 | (\_ -> _) |
128 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 125 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
129 | a | 126 | a |
130 | saTCGen | 127 | saTCGen |
131 | = \(a :: _) -> case'StageAttrs | 128 | = \(a :: _) -> case'StageAttrs |
132 | (\_ -> _ :: _) | 129 | (\_ -> _) |
133 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 130 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
134 | a | 131 | a |
135 | saTCMod | 132 | saTCMod |
136 | = \(a :: _) -> case'StageAttrs | 133 | = \(a :: _) -> case'StageAttrs |
137 | (\_ -> _ :: _) | 134 | (\_ -> _) |
138 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 135 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
139 | a | 136 | a |
140 | saTexture | 137 | saTexture |
141 | = \(a :: _) -> case'StageAttrs | 138 | = \(a :: _) -> case'StageAttrs |
142 | (\_ -> _ :: _) | 139 | (\_ -> _) |
143 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 140 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
144 | a | 141 | a |
145 | saDepthWrite | 142 | saDepthWrite |
146 | = \(a :: _) -> case'StageAttrs | 143 | = \(a :: _) -> case'StageAttrs |
147 | (\_ -> _ :: _) | 144 | (\_ -> _) |
148 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 145 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
149 | a | 146 | a |
150 | saDepthFunc | 147 | saDepthFunc |
151 | = \(a :: _) -> case'StageAttrs | 148 | = \(a :: _) -> case'StageAttrs |
152 | (\_ -> _ :: _) | 149 | (\_ -> _) |
153 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 150 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
154 | a | 151 | a |
155 | saAlphaFunc | 152 | saAlphaFunc |
156 | = \(a :: _) -> case'StageAttrs | 153 | = \(a :: _) -> case'StageAttrs |
157 | (\_ -> _ :: _) | 154 | (\_ -> _) |
158 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 155 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
159 | a | 156 | a |
160 | saDepthMaskExplicit | 157 | saDepthMaskExplicit |
161 | = \(a :: _) -> case'StageAttrs | 158 | = \(a :: _) -> case'StageAttrs |
162 | (\_ -> _ :: _) | 159 | (\_ -> _) |
163 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 160 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
164 | a | 161 | a |
165 | saTextureUniform | 162 | saTextureUniform |
166 | = \(a :: _) -> case'StageAttrs | 163 | = \(a :: _) -> case'StageAttrs |
167 | (\_ -> _ :: _) | 164 | (\_ -> _) |
168 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 165 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
169 | a | 166 | a |
170 | defaultStageAttrs | 167 | defaultStageAttrs |
@@ -193,62 +190,62 @@ data CommonAttrs :: Type where | |||
193 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs | 190 | -> CullType -> [Deform] -> Bool -> Bool -> [StageAttrs] -> Bool -> CommonAttrs |
194 | caSkyParms | 191 | caSkyParms |
195 | = \(a :: _) -> case'CommonAttrs | 192 | = \(a :: _) -> case'CommonAttrs |
196 | (\_ -> _ :: _) | 193 | (\_ -> _) |
197 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 194 | (\(b :: _) _ _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
198 | a | 195 | a |
199 | caFogParms | 196 | caFogParms |
200 | = \(a :: _) -> case'CommonAttrs | 197 | = \(a :: _) -> case'CommonAttrs |
201 | (\_ -> _ :: _) | 198 | (\_ -> _) |
202 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) | 199 | (\_ (b :: _) _ _ _ _ _ _ _ _ _ _ -> _rhs b) |
203 | a | 200 | a |
204 | caPortal | 201 | caPortal |
205 | = \(a :: _) -> case'CommonAttrs | 202 | = \(a :: _) -> case'CommonAttrs |
206 | (\_ -> _ :: _) | 203 | (\_ -> _) |
207 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) | 204 | (\_ _ (b :: _) _ _ _ _ _ _ _ _ _ -> _rhs b) |
208 | a | 205 | a |
209 | caSort | 206 | caSort |
210 | = \(a :: _) -> case'CommonAttrs | 207 | = \(a :: _) -> case'CommonAttrs |
211 | (\_ -> _ :: _) | 208 | (\_ -> _) |
212 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) | 209 | (\_ _ _ (b :: _) _ _ _ _ _ _ _ _ -> _rhs b) |
213 | a | 210 | a |
214 | caEntityMergable | 211 | caEntityMergable |
215 | = \(a :: _) -> case'CommonAttrs | 212 | = \(a :: _) -> case'CommonAttrs |
216 | (\_ -> _ :: _) | 213 | (\_ -> _) |
217 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) | 214 | (\_ _ _ _ (b :: _) _ _ _ _ _ _ _ -> _rhs b) |
218 | a | 215 | a |
219 | caFogOnly | 216 | caFogOnly |
220 | = \(a :: _) -> case'CommonAttrs | 217 | = \(a :: _) -> case'CommonAttrs |
221 | (\_ -> _ :: _) | 218 | (\_ -> _) |
222 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) | 219 | (\_ _ _ _ _ (b :: _) _ _ _ _ _ _ -> _rhs b) |
223 | a | 220 | a |
224 | caCull | 221 | caCull |
225 | = \(a :: _) -> case'CommonAttrs | 222 | = \(a :: _) -> case'CommonAttrs |
226 | (\_ -> _ :: _) | 223 | (\_ -> _) |
227 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) | 224 | (\_ _ _ _ _ _ (b :: _) _ _ _ _ _ -> _rhs b) |
228 | a | 225 | a |
229 | caDeformVertexes | 226 | caDeformVertexes |
230 | = \(a :: _) -> case'CommonAttrs | 227 | = \(a :: _) -> case'CommonAttrs |
231 | (\_ -> _ :: _) | 228 | (\_ -> _) |
232 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) | 229 | (\_ _ _ _ _ _ _ (b :: _) _ _ _ _ -> _rhs b) |
233 | a | 230 | a |
234 | caNoMipMaps | 231 | caNoMipMaps |
235 | = \(a :: _) -> case'CommonAttrs | 232 | = \(a :: _) -> case'CommonAttrs |
236 | (\_ -> _ :: _) | 233 | (\_ -> _) |
237 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) | 234 | (\_ _ _ _ _ _ _ _ (b :: _) _ _ _ -> _rhs b) |
238 | a | 235 | a |
239 | caPolygonOffset | 236 | caPolygonOffset |
240 | = \(a :: _) -> case'CommonAttrs | 237 | = \(a :: _) -> case'CommonAttrs |
241 | (\_ -> _ :: _) | 238 | (\_ -> _) |
242 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) | 239 | (\_ _ _ _ _ _ _ _ _ (b :: _) _ _ -> _rhs b) |
243 | a | 240 | a |
244 | caStages | 241 | caStages |
245 | = \(a :: _) -> case'CommonAttrs | 242 | = \(a :: _) -> case'CommonAttrs |
246 | (\_ -> _ :: _) | 243 | (\_ -> _) |
247 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) | 244 | (\_ _ _ _ _ _ _ _ _ _ (b :: _) _ -> _rhs b) |
248 | a | 245 | a |
249 | caIsSky | 246 | caIsSky |
250 | = \(a :: _) -> case'CommonAttrs | 247 | = \(a :: _) -> case'CommonAttrs |
251 | (\_ -> _ :: _) | 248 | (\_ -> _) |
252 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) | 249 | (\_ _ _ _ _ _ _ _ _ _ _ (b :: _) -> _rhs b) |
253 | a | 250 | a |
254 | defaultCommonAttrs | 251 | defaultCommonAttrs |
diff --git a/testdata/typeclass.out b/testdata/typeclass.out index 82487126..dcc242da 100644 --- a/testdata/typeclass.out +++ b/testdata/typeclass.out | |||
@@ -4,9 +4,9 @@ infix 4 /= | |||
4 | infix 4 < | 4 | infix 4 < |
5 | infixr 3 && | 5 | infixr 3 && |
6 | infixr 2 || | 6 | infixr 2 || |
7 | not = \(a :: _) -> case'Bool (\_ -> _ :: _) (_rhs True) (_rhs False) a | 7 | not = \(a :: _) -> case'Bool (\_ -> _) (_rhs True) (_rhs False) a |
8 | (&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _ :: _) (_rhs False) (_rhs b) a | 8 | (&&) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs False) (_rhs b) a |
9 | (||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _ :: _) (_rhs b) (_rhs True) a | 9 | (||) = \(a :: _) (b :: _) -> case'Bool (\_ -> _) (_rhs b) (_rhs True) a |
10 | 'Eq | 10 | 'Eq |
11 | = (\(a :: _) -> match'Bool | 11 | = (\(a :: _) -> match'Bool |
12 | (\_ -> _) | 12 | (\_ -> _) |
@@ -19,11 +19,7 @@ not = \(a :: _) -> case'Bool (\_ -> _ :: _) (_rhs True) (_rhs False) a | |||
19 | (\_ -> _) | 19 | (\_ -> _) |
20 | (_rhs | 20 | (_rhs |
21 | \(b | 21 | \(b |
22 | := \(c :: _) (d :: _) -> case'Bool | 22 | := \(c :: _) (d :: _) -> case'Bool (\_ -> _) (_rhs (not d)) (_rhs d) c) -> b) |
23 | (\_ -> _ :: _) | ||
24 | (_rhs (not d)) | ||
25 | (_rhs d) | ||
26 | c) -> b) | ||
27 | a | 23 | a |
28 | (_rhs undefined)) | 24 | (_rhs undefined)) |
29 | :: forall e . Eq e => e -> e -> Bool | 25 | :: forall e . Eq e => e -> e -> Bool |
diff --git a/testdata/zip01.out b/testdata/zip01.out index 5471a160..8ba64e69 100644 --- a/testdata/zip01.out +++ b/testdata/zip01.out | |||
@@ -1,10 +1,10 @@ | |||
1 | ------------ desugared source code | 1 | ------------ desugared source code |
2 | zip2 | 2 | zip2 |
3 | = (\(a :: _) (b :: _) -> case'List | 3 | = (\(a :: _) (b :: _) -> case'List |
4 | (\_ -> _ :: _) | 4 | (\_ -> _) |
5 | (_rhs []) | 5 | (_rhs []) |
6 | (\(c :: _) (d :: _) -> case'List | 6 | (\(c :: _) (d :: _) -> case'List |
7 | (\_ -> _ :: _) | 7 | (\_ -> _) |
8 | (_rhs []) | 8 | (_rhs []) |
9 | (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip2 d f)) | 9 | (\(e :: _) (f :: _) -> _rhs (HCons c (HCons e HNil) : zip2 d f)) |
10 | b) | 10 | b) |