src/containers/types/bitset.bend

bend-collections-laws-containers@1.0.0.0 · 27 lines · 0 definitions

1import Base
2
3# Neutral datatypes shared by src/bitset.bend and spec/bitset.bend.
4
5type Error is Data:
6  IndexOutOfRange{}
7  LengthMismatch{}
8
9# Binary operations carry the operand as its logical bit sequence (bit 0
10# first); the runner builds the operand bitset with the public from_bools.
11type Op is Data:
12  Length{}
13  Get{index: Nat}
14  Set{index: Nat}
15  Clear{index: Nat}
16  Count{}
17  Union{other: List<&2, Bool>}
18  Intersection{other: List<&2, Bool>}
19  Difference{other: List<&2, Bool>}
20  Xor{other: List<&2, Bool>}
21  ToList{}
22
23type Obs is Data:
24  ONat{value: Nat}
25  OBit{result: Result<&2, &2, Error, Bool>}
26  OUnit{result: Result<&2, &2, Error, Unit>}
27  OList{members: List<&2, Nat>}