mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 03:45:29 +03:00
44 lines
969 B
Plaintext
44 lines
969 B
Plaintext
---
|
|
source: tests/golden_tests.rs
|
|
input_file: tests/golden_tests/encode_pattern_match/pattern_match_encoding.bend
|
|
---
|
|
Scott
|
|
(Foo) = λa (a λ* 100 λ* 200 λ* 200 λ* λ* 200 λ* λ* 200)
|
|
|
|
(main) = (Foo MyType/A 2)
|
|
|
|
(MyType/A) = λa λb λ* λ* λ* λ* (b a)
|
|
|
|
(MyType/B) = λa λ* λc λ* λ* λ* (c a)
|
|
|
|
(MyType/C) = λa λ* λ* λd λ* λ* (d a)
|
|
|
|
(MyType/D) = λa λb λ* λ* λ* λf λ* (f a b)
|
|
|
|
(MyType/E) = λa λb λ* λ* λ* λ* λg (g a b)
|
|
|
|
NumScott
|
|
(Foo) = λa (a λb switch b { 0: λ* 100; _: λd switch d { 0: λ* 200; _: λf switch f { 0: λ* 200; _: λh switch h { 0: λ* λ* 200; _: λ* λ* λ* 200; }; }; }; })
|
|
|
|
(main) = (Foo MyType/A 2)
|
|
|
|
(MyType/A) = λa λb (b MyType/A/tag a)
|
|
|
|
(MyType/B) = λa λb (b MyType/B/tag a)
|
|
|
|
(MyType/C) = λa λb (b MyType/C/tag a)
|
|
|
|
(MyType/D) = λa λb λc (c MyType/D/tag a b)
|
|
|
|
(MyType/E) = λa λb λc (c MyType/E/tag a b)
|
|
|
|
(MyType/A/tag) = 0
|
|
|
|
(MyType/B/tag) = 1
|
|
|
|
(MyType/C/tag) = 2
|
|
|
|
(MyType/D/tag) = 3
|
|
|
|
(MyType/E/tag) = 4
|