mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 11:56:54 +03:00
26 lines
573 B
Plaintext
26 lines
573 B
Plaintext
---
|
|
source: tests/golden_tests.rs
|
|
input_file: tests/golden_tests/simplify_matches/nested.bend
|
|
---
|
|
(Rule) = λa match a { Foo/CtrA b c: (match c { Bar/CtrB1 d: λe (e d); Bar/CtrB2 f g: λh (match f { Baz/CtrC: λi λj (i j); } h g); } b); Foo/CtrB k: k; }
|
|
|
|
(Foo/CtrA) = λa λb λc (c Foo/CtrA/tag a b)
|
|
|
|
(Foo/CtrB) = λa λb (b Foo/CtrB/tag a)
|
|
|
|
(Bar/CtrB1) = λa λb (b Bar/CtrB1/tag a)
|
|
|
|
(Bar/CtrB2) = λa λb λc (c Bar/CtrB2/tag a b)
|
|
|
|
(Baz/CtrC) = λa (a Baz/CtrC/tag)
|
|
|
|
(Foo/CtrA/tag) = 0
|
|
|
|
(Foo/CtrB/tag) = 1
|
|
|
|
(Bar/CtrB1/tag) = 0
|
|
|
|
(Bar/CtrB2/tag) = 1
|
|
|
|
(Baz/CtrC/tag) = 0
|