enumset-0.0.4.1: Sets of enumeration values represented by machine words

Safe HaskellSafe
LanguageHaskell98

Data.EnumSet.PackedEnum

Description

Deprecated: use Data.FlagSet instead

Extract and inject an Enum value into an EnumSet.

Synopsis

Documentation

data T w a b Source #

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.

Constructors

Cons w Int 

unpack :: (Integral w, Bits w, Enum a, Enum b) => T w a b -> T w a -> b Source #

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 a Source #

Create an enumeration set, where an value of type b is placed at the specified indices.

clear :: (Bits w, Enum a, Enum b) => T w a b -> T w a -> T w a Source #

Clear all bits at the specified indices.

put :: (Num w, Bits w, Enum a, Enum b) => T w a b -> b -> T w a -> T w a Source #

Overwrite an enumset at the specified indices with the value of type b.