2024-02-01 17:18:38 +03:00
|
|
|
---
|
|
|
|
source: tests/golden_tests.rs
|
2024-05-15 01:25:46 +03:00
|
|
|
input_file: tests/golden_tests/encode_pattern_match/definition_merge.bend
|
2024-02-01 17:18:38 +03:00
|
|
|
---
|
2024-05-18 15:01:20 +03:00
|
|
|
Scott
|
2024-05-29 10:15:13 +03:00
|
|
|
(Foo) = λa (a λb (b λc (c λf (f 1 1) λg (g 2 2)) λh (h λk (k 1 1) λl (l 2 2))) λm (m λn (n λq (q 3 3) λr (r 3 3)) λs (s λv (v 3 3) λw (w 3 3))))
|
2024-02-07 18:19:07 +03:00
|
|
|
|
2024-05-10 22:42:32 +03:00
|
|
|
(Either/Left) = λa λb λ* (b a)
|
2024-02-07 18:19:07 +03:00
|
|
|
|
2024-05-10 22:42:32 +03:00
|
|
|
(Either/Right) = λa λ* λc (c a)
|
2024-02-07 18:19:07 +03:00
|
|
|
|
2024-05-29 10:15:13 +03:00
|
|
|
(Bool/True) = λa λ* a
|
2024-03-19 20:37:30 +03:00
|
|
|
|
2024-05-29 10:15:13 +03:00
|
|
|
(Bool/False) = λ* λb b
|
2024-05-18 15:01:20 +03:00
|
|
|
|
|
|
|
NumScott
|
2024-05-29 10:15:13 +03:00
|
|
|
(Foo) = λa (a λb switch b { 0: λc (c λd switch d { 0: λe (e λh switch h { 0: λi (i λj switch j { 0: 1; _: λ* 1; }); _: λ* λk (k λl switch l { 0: 2; _: λ* 2; }); }); _: λ* λm (m λp switch p { 0: λq (q λr switch r { 0: 1; _: λ* 1; }); _: λ* λs (s λt switch t { 0: 2; _: λ* 2; }); }); }); _: λ* λu (u λv switch v { 0: λw (w λz switch z { 0: λab (ab λbb switch bb { 0: 3; _: λ* 3; }); _: λ* λcb (cb λdb switch db { 0: 3; _: λ* 3; }); }); _: λ* λeb (eb λhb switch hb { 0: λib (ib λjb switch jb { 0: 3; _: λ* 3; }); _: λ* λkb (kb λlb switch lb { 0: 3; _: λ* 3; }); }); }); })
|
2024-05-18 15:01:20 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(Either/Left) = λa λb (b Either/Left/tag a)
|
2024-05-18 15:01:20 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(Either/Right) = λa λb (b Either/Right/tag a)
|
2024-05-18 15:01:20 +03:00
|
|
|
|
2024-05-29 10:15:13 +03:00
|
|
|
(Bool/True) = λa (a Bool/True/tag)
|
2024-05-18 15:01:20 +03:00
|
|
|
|
2024-05-29 10:15:13 +03:00
|
|
|
(Bool/False) = λa (a Bool/False/tag)
|
2024-05-27 21:09:23 +03:00
|
|
|
|
|
|
|
(Either/Left/tag) = 0
|
|
|
|
|
|
|
|
(Either/Right/tag) = 1
|
|
|
|
|
2024-05-29 10:15:13 +03:00
|
|
|
(Bool/True/tag) = 0
|
2024-05-27 21:09:23 +03:00
|
|
|
|
2024-05-29 10:15:13 +03:00
|
|
|
(Bool/False/tag) = 1
|