diff options
Diffstat (limited to 'testdata/Prelude.out')
-rw-r--r-- | testdata/Prelude.out | 115 |
1 files changed, 55 insertions, 60 deletions
diff --git a/testdata/Prelude.out b/testdata/Prelude.out index e1b26503..a1e29933 100644 --- a/testdata/Prelude.out +++ b/testdata/Prelude.out | |||
@@ -67,21 +67,19 @@ unzip | |||
67 | (\(f :: _) (g :: _) -> hlistNilCase | 67 | (\(f :: _) (g :: _) -> hlistNilCase |
68 | _ | 68 | _ |
69 | (_rhs | 69 | (_rhs |
70 | \(h := _rhs (unzip c)) | 70 | let h = _rhs (unzip c) in let i |
71 | (i | 71 | = _rhs |
72 | := _rhs | 72 | ((\(j :: _) -> hlistConsCase |
73 | ((\(k :: _) -> hlistConsCase | 73 | _ |
74 | _ | 74 | (\_ (k :: _) -> hlistConsCase _ (\(l :: _) (m :: _) -> hlistNilCase _ l m) k) |
75 | (\_ (l :: _) -> hlistConsCase _ (\(m :: _) (n :: _) -> hlistNilCase _ m n) l) | 75 | j) |
76 | k) | 76 | h) in let n |
77 | h)) | 77 | = _rhs |
78 | (j | 78 | ((\(o :: _) -> hlistConsCase |
79 | := _rhs | 79 | _ |
80 | ((\(o :: _) -> hlistConsCase | 80 | (\(p :: _) (q :: _) -> hlistConsCase _ (\_ (r :: _) -> hlistNilCase _ p r) q) |
81 | _ | 81 | o) |
82 | (\(p :: _) (q :: _) -> hlistConsCase _ (\_ (r :: _) -> hlistNilCase _ p r) q) | 82 | h) in HCons (d : n) (HCons (f : i) HNil)) |
83 | o) | ||
84 | h)) -> HCons (d : j) (HCons (f : i) HNil)) | ||
85 | g) | 83 | g) |
86 | e) | 84 | e) |
87 | b) | 85 | b) |
@@ -121,21 +119,19 @@ split | |||
121 | (\_ -> _) | 119 | (\_ -> _) |
122 | (_rhs (HCons [] (HCons [] HNil))) | 120 | (_rhs (HCons [] (HCons [] HNil))) |
123 | (\(b :: _) (c :: _) -> _rhs | 121 | (\(b :: _) (c :: _) -> _rhs |
124 | \(d := _rhs (split c)) | 122 | let d = _rhs (split c) in let e |
125 | (e | 123 | = _rhs |
126 | := _rhs | 124 | ((\(f :: _) -> hlistConsCase |
127 | ((\(g :: _) -> hlistConsCase | 125 | _ |
128 | _ | 126 | (\_ (g :: _) -> hlistConsCase _ (\(h :: _) (i :: _) -> hlistNilCase _ h i) g) |
129 | (\_ (h :: _) -> hlistConsCase _ (\(i :: _) (j :: _) -> hlistNilCase _ i j) h) | 127 | f) |
130 | g) | 128 | d) in let j |
131 | d)) | 129 | = _rhs |
132 | (f | 130 | ((\(k :: _) -> hlistConsCase |
133 | := _rhs | 131 | _ |
134 | ((\(k :: _) -> hlistConsCase | 132 | (\(l :: _) (m :: _) -> hlistConsCase _ (\_ (n :: _) -> hlistNilCase _ l n) m) |
135 | _ | 133 | k) |
136 | (\(l :: _) (m :: _) -> hlistConsCase _ (\_ (n :: _) -> hlistNilCase _ l n) m) | 134 | d) in HCons (b : e) (HCons j HNil)) |
137 | k) | ||
138 | d)) -> HCons (b : e) (HCons f HNil)) | ||
139 | a | 135 | a |
140 | 136 | ||
141 | mergeBy | 137 | mergeBy |
@@ -547,9 +543,8 @@ perspective | |||
547 | :: Float -> Float -> Float -> Float -> Mat (fromInt 4) (fromInt 4) Float | 543 | :: Float -> Float -> Float -> Float -> Mat (fromInt 4) (fromInt 4) Float |
548 | perspective | 544 | perspective |
549 | = \(a :: _) (b :: _) (c :: _) (d :: _) -> _rhs | 545 | = \(a :: _) (b :: _) (c :: _) (d :: _) -> _rhs |
550 | \(e := _rhs (a * tan (c / fromInt 2))) | 546 | let e = _rhs (a * tan (c / fromInt 2)) in let f = _rhs (fromInt 0 - e) in let g |
551 | (f := _rhs (fromInt 0 - e)) | 547 | = _rhs (d * e) in let h = _rhs (fromInt 0 - g) in M44F |
552 | (g := _rhs (d * e)) (h := _rhs (fromInt 0 - g)) -> M44F | ||
553 | (V4 (fromInt 2 * a / (g - h)) (fromInt 0) (fromInt 0) (fromInt 0)) | 548 | (V4 (fromInt 2 * a / (g - h)) (fromInt 0) (fromInt 0) (fromInt 0)) |
554 | (V4 (fromInt 0) (fromInt 2 * a / (e - f)) (fromInt 0) (fromInt 0)) | 549 | (V4 (fromInt 0) (fromInt 2 * a / (e - f)) (fromInt 0) (fromInt 0)) |
555 | (V4 | 550 | (V4 |
@@ -565,7 +560,7 @@ perspective | |||
565 | 560 | ||
566 | rotMatrixZ | 561 | rotMatrixZ |
567 | = \(a :: _) -> _rhs | 562 | = \(a :: _) -> _rhs |
568 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F | 563 | let b = _rhs (cos a) in let c = _rhs (sin a) in M44F |
569 | (V4 b c (fromInt 0) (fromInt 0)) | 564 | (V4 b c (fromInt 0) (fromInt 0)) |
570 | (V4 (fromInt 0 - c) b (fromInt 0) (fromInt 0)) | 565 | (V4 (fromInt 0 - c) b (fromInt 0) (fromInt 0)) |
571 | (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0)) | 566 | (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0)) |
@@ -573,7 +568,7 @@ rotMatrixZ | |||
573 | 568 | ||
574 | rotMatrixY | 569 | rotMatrixY |
575 | = \(a :: _) -> _rhs | 570 | = \(a :: _) -> _rhs |
576 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F | 571 | let b = _rhs (cos a) in let c = _rhs (sin a) in M44F |
577 | (V4 b (fromInt 0) (fromInt 0 - c) (fromInt 0)) | 572 | (V4 b (fromInt 0) (fromInt 0 - c) (fromInt 0)) |
578 | (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0)) | 573 | (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0)) |
579 | (V4 c (fromInt 0) b (fromInt 0)) | 574 | (V4 c (fromInt 0) b (fromInt 0)) |
@@ -581,7 +576,7 @@ rotMatrixY | |||
581 | 576 | ||
582 | rotMatrixX | 577 | rotMatrixX |
583 | = \(a :: _) -> _rhs | 578 | = \(a :: _) -> _rhs |
584 | \(b := _rhs (cos a)) (c := _rhs (sin a)) -> M44F | 579 | let b = _rhs (cos a) in let c = _rhs (sin a) in M44F |
585 | (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0)) | 580 | (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0)) |
586 | (V4 (fromInt 0) b c (fromInt 0)) | 581 | (V4 (fromInt 0) b c (fromInt 0)) |
587 | (V4 (fromInt 0) (fromInt 0 - c) b (fromInt 0)) | 582 | (V4 (fromInt 0) (fromInt 0 - c) b (fromInt 0)) |
@@ -594,16 +589,15 @@ rotationEuler | |||
594 | translateBefore4 :: Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float | 589 | translateBefore4 :: Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float |
595 | translateBefore4 | 590 | translateBefore4 |
596 | = \(a :: _) -> _rhs | 591 | = \(a :: _) -> _rhs |
597 | \(b := _rhs (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0))) | 592 | let b = _rhs (V4 (fromInt 1) (fromInt 0) (fromInt 0) (fromInt 0)) in let c |
598 | (c := _rhs (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0))) | 593 | = _rhs (V4 (fromInt 0) (fromInt 1) (fromInt 0) (fromInt 0)) in let d |
599 | (d := _rhs (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0))) | 594 | = _rhs (V4 (fromInt 0) (fromInt 0) (fromInt 1) (fromInt 0)) in let e |
600 | (e | 595 | = _rhs |
601 | := _rhs | 596 | (V4 |
602 | (V4 | 597 | (swizzscalar a Sx) |
603 | (swizzscalar a Sx) | 598 | (swizzscalar a Sy) |
604 | (swizzscalar a Sy) | 599 | (swizzscalar a Sz) |
605 | (swizzscalar a Sz) | 600 | (fromInt 1)) in M44F b c d e |
606 | (fromInt 1))) -> M44F b c d e | ||
607 | 601 | ||
608 | lookat | 602 | lookat |
609 | :: Vec (fromInt 3) Float | 603 | :: Vec (fromInt 3) Float |
@@ -611,20 +605,21 @@ lookat | |||
611 | -> Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float | 605 | -> Vec (fromInt 3) Float -> Mat (fromInt 4) (fromInt 4) Float |
612 | lookat | 606 | lookat |
613 | = \(a :: _) (b :: _) (c :: _) -> _rhs | 607 | = \(a :: _) (b :: _) (c :: _) -> _rhs |
614 | \(d | 608 | let d |
615 | := \(i :: _) -> _rhs | 609 | = \(e :: _) -> _rhs |
616 | (V4 (swizzscalar i Sx) (swizzscalar i Sy) (swizzscalar i Sz) (fromInt 0))) | 610 | (V4 |
617 | (e := _rhs (normalize $ a - b)) | 611 | (swizzscalar e Sx) |
618 | (f := _rhs (normalize $ c `cross` e)) | 612 | (swizzscalar e Sy) |
619 | (g := _rhs (e `cross` f)) | 613 | (swizzscalar e Sz) |
620 | (h | 614 | (fromInt 0)) in let f = _rhs (normalize $ a - b) in let g |
621 | := _rhs | 615 | = _rhs (normalize $ c `cross` f) in let h = _rhs (f `cross` g) in let i |
622 | (transpose | 616 | = _rhs |
623 | $ M44F | 617 | (transpose |
624 | (d f) | 618 | $ M44F |
625 | (d g) | 619 | (d g) |
626 | (d e) | 620 | (d h) |
627 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1)))) -> h | 621 | (d f) |
622 | (V4 (fromInt 0) (fromInt 0) (fromInt 0) (fromInt 1))) in i | ||
628 | .*. translateBefore4 (neg a) | 623 | .*. translateBefore4 (neg a) |
629 | 624 | ||
630 | scale = \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0) | 625 | scale = \(a :: _) (b :: _) -> _rhs (b * V4 a a a 1.0) |