mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-08-15 14:50:42 +03:00
18 lines
646 B
Plaintext
18 lines
646 B
Plaintext
---
|
|
source: tests/golden_tests.rs
|
|
input_file: tests/golden_tests/simplify_matches/bits_dec.bend
|
|
---
|
|
(Data.Bits.dec) = λa match a { Data/Bits/e: Data/Bits/e; Data/Bits/o b: match b { Data/Bits/e: Data/Bits/e; Data/Bits/o c: (Data/Bits/i (Data.Bits.dec c)); Data/Bits/i d: (Data/Bits/i (Data.Bits.dec d)); }; Data/Bits/i e: match e { Data/Bits/e: (Data/Bits/o Data/Bits/e); Data/Bits/o f: (Data/Bits/o f); Data/Bits/i g: (Data/Bits/o g); }; }
|
|
|
|
(Data/Bits/e) = λa (a Data/Bits/e/tag)
|
|
|
|
(Data/Bits/o) = λa λb (b Data/Bits/o/tag a)
|
|
|
|
(Data/Bits/i) = λa λb (b Data/Bits/i/tag a)
|
|
|
|
(Data/Bits/e/tag) = 0
|
|
|
|
(Data/Bits/o/tag) = 1
|
|
|
|
(Data/Bits/i/tag) = 2
|