Safe Haskell | Safe-Infered |
---|
Extract and inject an Enum value into an EnumSet.
Documentation
T w a b
describes a contiguous set of bit indices into the word type w
where the indices are of type a
and the set of indices represent a value of type b
.
unpack :: (Integral w, Bits w, Enum a, Enum b) => T w a b -> T w a -> bSource
Extract an enumeration value from the specified index set.
pack :: (Num w, Bits w, Enum a, Enum b) => T w a b -> b -> T w aSource
Create an enumeration set, where an value of type b
is placed at the specified indices.