2024-01-19 22:06:19 +03:00
|
|
|
---
|
|
|
|
source: tests/golden_tests.rs
|
2024-05-15 01:25:46 +03:00
|
|
|
input_file: tests/golden_tests/encode_pattern_match/match_adt_unscoped_var.bend
|
2024-01-19 22:06:19 +03:00
|
|
|
---
|
2024-05-18 15:01:20 +03:00
|
|
|
Scott
|
2024-05-10 22:42:32 +03:00
|
|
|
(Foo) = λ$x (Maybe/Some 1 $x λa a)
|
2024-02-07 17:31:19 +03:00
|
|
|
|
2024-05-10 22:42:32 +03:00
|
|
|
(Bar) = (Maybe/Some 1 $x λa a λ$x *)
|
2024-02-07 18:19:07 +03:00
|
|
|
|
|
|
|
(main) = *
|
|
|
|
|
2024-05-10 22:42:32 +03:00
|
|
|
(Maybe/None) = λa λ* a
|
2024-03-19 20:37:30 +03:00
|
|
|
|
2024-05-10 22:42:32 +03:00
|
|
|
(Maybe/Some) = λa λ* λc (c a)
|
2024-05-18 15:01:20 +03:00
|
|
|
|
|
|
|
NumScott
|
|
|
|
(Foo) = λ$x (Maybe/Some 1 λa switch a { 0: $x; _: λ* λb b; })
|
|
|
|
|
|
|
|
(Bar) = (Maybe/Some 1 λa switch a { 0: $x; _: λ* λb b; } λ$x *)
|
|
|
|
|
|
|
|
(main) = *
|
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(Maybe/None) = λa (a Maybe/None/tag)
|
2024-05-18 15:01:20 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(Maybe/Some) = λa λb (b Maybe/Some/tag a)
|
|
|
|
|
|
|
|
(Maybe/None/tag) = 0
|
|
|
|
|
|
|
|
(Maybe/Some/tag) = 1
|