A primitive: the single bit
just like random, its pretty easy to implement all sorts of generators etc. for a Bit
bitFuzz : Fuzzer Bit
bitFuzz =
Fuzz.oneOf (List.map Fuzz.constant [ O, I ])NConvert O to n0, I to 1.
N (In (Up0 minX_) (Up1 maxX_)) means that the result will be between 0 & 1
toInt =
Bit.toN >> N.toIntI'll be happy to add or merge more stuff! Just open an issue or a PR
One of 2 states:
IOThis right here is really the core of this library. Representing bits safely is now quite readable!
for an example of using this to represent an
Id, visit the readme