git.iko.soy/rowtype-yoga/purescript-backend-optimizer
on main help sign in
64 lines 1.7 kB history raw
1const $Column = (tag, _1, _2) => ({tag, _1, _2});
2const Zero = /* #__PURE__ */ $Column("Zero");
3const One = value0 => $Column("One", value0);
4const Two = value0 => value1 => $Column("Two", value0, value1);
5const testPBAN = v => v1 => {
6 if (v.tag === "One") {
7 if (v1.tag === "One") {
8 if (v._1 === 1) {
9 if (v1._1 === 1) { return 1; }
10 return 4;
11 }
12 if (v._1 === 2 && v1._1 === 2) { return 2; }
13 }
14 return 4;
15 }
16 if (v.tag === "Two" && v1.tag === "Two") { return 3; }
17 return 4;
18};
19const testPBA = v => v1 => {
20 if (v1.tag === "One") {
21 if (v.tag === "One") {
22 if (v._1 === 1) {
23 if (v1._1 === 1) { return 1; }
24 return 4;
25 }
26 if (v._1 === 2 && v1._1 === 2) { return 2; }
27 }
28 return 4;
29 }
30 if (v.tag === "Two" && v._1 === 1 && v1.tag === "Two") { return 3; }
31 return 4;
32};
33const testPB = v => v1 => {
34 if (v.tag === "One") {
35 if (v._1 === 1 && v1.tag === "One") {
36 if (v1._1 === 1) { return 1; }
37 return 4;
38 }
39 if (v1.tag === "Zero") { return 3; }
40 return 4;
41 }
42 if (v.tag === "Two" && v._1 === 2 && v._2 === 3 && v1.tag === "Two") {
43 if (v1._1 === 2 && v1._2 === 3) { return 2; }
44 return 4;
45 }
46 if (v1.tag === "Zero") { return 3; }
47 return 4;
48};
49const testP = v => v1 => v2 => {
50 if (v1 === 2) {
51 if (v === 1) {
52 if (v2 === 1) { return 1; }
53 if (v2 === 2) { return 2; }
54 if (v2 === 3) { return 3; }
55 if (v2 === 4) { return 4; }
56 return 5;
57 }
58 if (v2 === 3) { return 3; }
59 return 5;
60 }
61 if (v === 1 && v2 === 4) { return 4; }
62 return 5;
63};
64export {$Column, One, Two, Zero, testP, testPB, testPBA, testPBAN};