mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 03:45:29 +03:00
30 lines
558 B
Plaintext
30 lines
558 B
Plaintext
---
|
|
source: tests/golden_tests.rs
|
|
input_file: tests/golden_tests/encode_pattern_match/match_adt_unscoped_var.bend
|
|
---
|
|
Scott
|
|
(Foo) = λ$x (Maybe/Some 1 $x λa a)
|
|
|
|
(Bar) = (Maybe/Some 1 $x λa a λ$x *)
|
|
|
|
(main) = *
|
|
|
|
(Maybe/None) = λa λ* a
|
|
|
|
(Maybe/Some) = λa λ* λc (c a)
|
|
|
|
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) = *
|
|
|
|
(Maybe/None) = λa (a Maybe/None/tag)
|
|
|
|
(Maybe/Some) = λa λb (b Maybe/Some/tag a)
|
|
|
|
(Maybe/None/tag) = 0
|
|
|
|
(Maybe/Some/tag) = 1
|