2024-02-13 22:34:32 +03:00
|
|
|
---
|
|
|
|
source: tests/golden_tests.rs
|
2024-05-15 01:25:46 +03:00
|
|
|
input_file: tests/golden_tests/simplify_matches/bits_dec.bend
|
2024-02-13 22:34:32 +03:00
|
|
|
---
|
2024-05-10 22:42:32 +03:00
|
|
|
(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); }; }
|
2024-02-13 22:34:32 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(Data/Bits/e) = λa (a Data/Bits/e/tag)
|
2024-02-13 22:34:32 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(Data/Bits/o) = λa λb (b Data/Bits/o/tag a)
|
2024-02-13 22:34:32 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(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
|