2024-03-27 22:41:30 +03:00
|
|
|
---
|
|
|
|
source: tests/golden_tests.rs
|
2024-05-15 01:25:46 +03:00
|
|
|
input_file: tests/golden_tests/desugar_file/combinators.bend
|
2024-03-27 22:41:30 +03:00
|
|
|
---
|
|
|
|
(foo) = λa λ* λ* (foo a)
|
|
|
|
|
|
|
|
(bar) = λa λb (a bar b)
|
|
|
|
|
2024-05-18 15:01:20 +03:00
|
|
|
(List/ignore) = λa λ* (a List/ignore__C1)
|
2024-03-27 22:41:30 +03:00
|
|
|
|
|
|
|
(baz) = {0 1 2 3 λa a foo}
|
|
|
|
|
|
|
|
(qux) = {0 qux}
|
|
|
|
|
2024-04-23 13:44:01 +03:00
|
|
|
(clax) = (λa a clax__C0)
|
2024-03-29 01:10:49 +03:00
|
|
|
|
2024-03-27 22:41:30 +03:00
|
|
|
(tup) = (tup, 1, 0)
|
|
|
|
|
2024-05-15 21:23:26 +03:00
|
|
|
(list) = (List/Cons 0 list__C0)
|
2024-03-27 22:41:30 +03:00
|
|
|
|
2024-04-23 13:44:01 +03:00
|
|
|
(A) = λa (A__C0 a)
|
2024-03-28 21:34:42 +03:00
|
|
|
|
2024-04-23 13:44:01 +03:00
|
|
|
(B) = λa (B__C0 a)
|
2024-03-27 22:41:30 +03:00
|
|
|
|
2024-07-24 13:47:39 +03:00
|
|
|
(Main) = (List/Cons 0 (List/Cons list List/Nil))
|
2024-03-27 22:41:30 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(List/Nil) = λa (a List/Nil/tag)
|
2024-03-27 22:41:30 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(List/Cons) = λa λb λc (c List/Cons/tag a b)
|
|
|
|
|
|
|
|
(List/Nil/tag) = 0
|
|
|
|
|
|
|
|
(List/Cons/tag) = 1
|
2024-03-27 22:41:30 +03:00
|
|
|
|
2024-04-23 13:44:01 +03:00
|
|
|
(A__C0) = let {a b} = A; λc (a b c)
|
2024-03-27 22:41:30 +03:00
|
|
|
|
2024-04-23 13:44:01 +03:00
|
|
|
(B__C0) = let (a, b) = B; λc (a b c)
|
2024-03-27 22:41:30 +03:00
|
|
|
|
2024-05-18 15:01:20 +03:00
|
|
|
(List/ignore__C0) = λ* λ* λa (List/ignore a List/ignore)
|
|
|
|
|
|
|
|
(List/ignore__C1) = λa switch a { 0: 0; _: List/ignore__C0; }
|
2024-03-27 22:41:30 +03:00
|
|
|
|
2024-04-23 13:44:01 +03:00
|
|
|
(clax__C0) = λ* λ* λ* λa (clax a)
|
2024-03-29 01:10:49 +03:00
|
|
|
|
2024-05-15 21:23:26 +03:00
|
|
|
(list__C0) = (List/Cons list List/Nil)
|