GHC.Data.EnumSet
Description
A tiny wrapper around IntSet for representing sets of Enum things.
IntSet
Enum
data EnumSet a Source #
Defined in GHC.Data.EnumSet
Methods
mempty :: EnumSet a #
mappend :: EnumSet a -> EnumSet a -> EnumSet a #
mconcat :: [EnumSet a] -> EnumSet a #
(<>) :: EnumSet a -> EnumSet a -> EnumSet a #
sconcat :: NonEmpty (EnumSet a) -> EnumSet a #
stimes :: Integral b => b -> EnumSet a -> EnumSet a #
Represents the EnumSet as a bit set.
EnumSet
Assumes that all elements are non-negative.
This is only efficient for values that are sufficiently small, for example in the lower hundreds.
put_ :: BinHandle -> EnumSet a -> IO () Source #
put :: BinHandle -> EnumSet a -> IO (Bin (EnumSet a)) Source #
get :: BinHandle -> IO (EnumSet a) Source #
member :: Enum a => a -> EnumSet a -> Bool Source #
insert :: Enum a => a -> EnumSet a -> EnumSet a Source #
delete :: Enum a => a -> EnumSet a -> EnumSet a Source #
toList :: Enum a => EnumSet a -> [a] Source #
fromList :: Enum a => [a] -> EnumSet a Source #
empty :: EnumSet a Source #
difference :: EnumSet a -> EnumSet a -> EnumSet a Source #