enummapset-th-0.6.1.1: TH-generated EnumSet/EnumMap wrappers around IntSet/IntMap.

Safe Haskell | Trustworthy
Language | Haskell98

Data.EnumSet

Contents

- Operators
- Query
- Construction
- Combine
- Filter
- Map
- Folds
- Strict folds
- Min/Max
- Conversion: List
- Conversion: Ordered list
- Debugging

Description

Refer to the documentation for Data.IntSet.

Synopsis

- newtype EnumSet k = EnumSet {
  - unEnumSet :: IntSet
  }
- (\\) :: forall k. EnumSet k -> EnumSet k -> EnumSet k
- null :: forall k. EnumSet k -> Bool
- size :: forall k. EnumSet k -> Int
- member :: forall k. Enum k => k -> EnumSet k -> Bool
- notMember :: forall k. Enum k => k -> EnumSet k -> Bool
- lookupLT :: forall k. Enum k => k -> EnumSet k -> Maybe k
- lookupGT :: forall k. Enum k => k -> EnumSet k -> Maybe k
- lookupLE :: forall k. Enum k => k -> EnumSet k -> Maybe k
- lookupGE :: forall k. Enum k => k -> EnumSet k -> Maybe k
- isSubsetOf :: forall k. EnumSet k -> EnumSet k -> Bool
- isProperSubsetOf :: forall k. EnumSet k -> EnumSet k -> Bool
- empty :: forall k. EnumSet k
- singleton :: forall k. Enum k => k -> EnumSet k
- insert :: forall k. Enum k => k -> EnumSet k -> EnumSet k
- delete :: forall k. Enum k => k -> EnumSet k -> EnumSet k
- union :: forall k. EnumSet k -> EnumSet k -> EnumSet k
- unions :: forall k. [EnumSet k] -> EnumSet k
- difference :: forall k. EnumSet k -> EnumSet k -> EnumSet k
- intersection :: forall k. EnumSet k -> EnumSet k -> EnumSet k
- filter :: forall k. Enum k => (k -> Bool) -> EnumSet k -> EnumSet k
- partition :: forall k. Enum k => (k -> Bool) -> EnumSet k -> (EnumSet k, EnumSet k)
- split :: forall k. Enum k => k -> EnumSet k -> (EnumSet k, EnumSet k)
- splitMember :: forall k. Enum k => k -> EnumSet k -> (EnumSet k, Bool, EnumSet k)
- map :: forall k k'. (Enum k, Enum k') => (k -> k') -> EnumSet k -> EnumSet k'
- foldr :: forall k b. Enum k => (k -> b -> b) -> b -> EnumSet k -> b
- foldl :: forall k a. Enum k => (a -> k -> a) -> a -> EnumSet k -> a
- foldr' :: forall k b. Enum k => (k -> b -> b) -> b -> EnumSet k -> b
- foldl' :: forall k a. Enum k => (a -> k -> a) -> a -> EnumSet k -> a
- findMin :: forall k. Enum k => EnumSet k -> k
- findMax :: forall k. Enum k => EnumSet k -> k
- deleteMin :: forall k. EnumSet k -> EnumSet k
- deleteMax :: forall k. EnumSet k -> EnumSet k
- deleteFindMin :: forall k. Enum k => EnumSet k -> (k, EnumSet k)
- deleteFindMax :: forall k. Enum k => EnumSet k -> (k, EnumSet k)
- maxView :: forall k. Enum k => EnumSet k -> Maybe (k, EnumSet k)
- minView :: forall k. Enum k => EnumSet k -> Maybe (k, EnumSet k)
- elems :: forall k. Enum k => EnumSet k -> [k]
- toList :: forall k. Enum k => EnumSet k -> [k]
- fromList :: forall k. Enum k => [k] -> EnumSet k
- toAscList :: forall k. Enum k => EnumSet k -> [k]
- toDescList :: forall k. Enum k => EnumSet k -> [k]
- fromAscList :: forall k. Enum k => [k] -> EnumSet k
- fromDistinctAscList :: forall k. Enum k => [k] -> EnumSet k
- showTree :: forall k. EnumSet k -> String
- showTreeWith :: forall k. Bool -> Bool -> EnumSet k -> String

# Documentation

newtype EnumSet k Source #

Constructors

EnumSet |

Fields

- unEnumSet :: IntSet

Instances

Eq (EnumSet k) Source # |
Methods (==) :: EnumSet k -> EnumSet k -> Bool # (/=) :: EnumSet k -> EnumSet k -> Bool #
Data k => Data (EnumSet k) Source # |

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EnumSet k -> c (EnumSet k) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (EnumSet k) #

toConstr :: EnumSet k -> Constr #

dataTypeOf :: EnumSet k -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (EnumSet k)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (EnumSet k)) #

gmapT :: (forall b. Data b => b -> b) -> EnumSet k -> EnumSet k #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EnumSet k -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EnumSet k -> r #

gmapQ :: (forall d. Data d => d -> u) -> EnumSet k -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EnumSet k -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EnumSet k -> m (EnumSet k) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EnumSet k -> m (EnumSet k) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EnumSet k -> m (EnumSet k) #

Ord (EnumSet k) Source # |
Methods compare :: EnumSet k -> EnumSet k -> Ordering # (<) :: EnumSet k -> EnumSet k -> Bool # (<=) :: EnumSet k -> EnumSet k -> Bool # (>) :: EnumSet k -> EnumSet k -> Bool # (>=) :: EnumSet k -> EnumSet k -> Bool # max :: EnumSet k -> EnumSet k -> EnumSet k # min :: EnumSet k -> EnumSet k -> EnumSet k #
(Enum k, Read k) => Read (EnumSet k) Source # |
Methods readsPrec :: Int -> ReadS (EnumSet k) # readList :: ReadS [EnumSet k] # readPrec :: ReadPrec (EnumSet k) # readListPrec :: ReadPrec [EnumSet k] #
(Enum k, Show k) => Show (EnumSet k) Source # |
Methods showsPrec :: Int -> EnumSet k -> ShowS # show :: EnumSet k -> String # showList :: [EnumSet k] -> ShowS #
Monoid (EnumSet k) Source # |
Methods mempty :: EnumSet k # mappend :: EnumSet k -> EnumSet k -> EnumSet k # mconcat :: [EnumSet k] -> EnumSet k #
NFData (EnumSet k) Source # |
Methods rnf :: EnumSet k -> () #

# Operators

(\\) :: forall k. EnumSet k -> EnumSet k -> EnumSet k Source #

# Query

null :: forall k. EnumSet k -> Bool Source #

size :: forall k. EnumSet k -> Int Source #

member :: forall k. Enum k => k -> EnumSet k -> Bool Source #

notMember :: forall k. Enum k => k -> EnumSet k -> Bool Source #

lookupLT :: forall k. Enum k => k -> EnumSet k -> Maybe k Source #

lookupGT :: forall k. Enum k => k -> EnumSet k -> Maybe k Source #

lookupLE :: forall k. Enum k => k -> EnumSet k -> Maybe k Source #

lookupGE :: forall k. Enum k => k -> EnumSet k -> Maybe k Source #

isSubsetOf :: forall k. EnumSet k -> EnumSet k -> Bool Source #

isProperSubsetOf :: forall k. EnumSet k -> EnumSet k -> Bool Source #

# Construction

empty :: forall k. EnumSet k Source #

singleton :: forall k. Enum k => k -> EnumSet k Source #

insert :: forall k. Enum k => k -> EnumSet k -> EnumSet k Source #

delete :: forall k. Enum k => k -> EnumSet k -> EnumSet k Source #

# Combine

union :: forall k. EnumSet k -> EnumSet k -> EnumSet k Source #

unions :: forall k. [EnumSet k] -> EnumSet k Source #

difference :: forall k. EnumSet k -> EnumSet k -> EnumSet k Source #

intersection :: forall k. EnumSet k -> EnumSet k -> EnumSet k Source #

# Filter

filter :: forall k. Enum k => (k -> Bool) -> EnumSet k -> EnumSet k Source #

partition :: forall k. Enum k => (k -> Bool) -> EnumSet k -> (EnumSet k, EnumSet k) Source #

split :: forall k. Enum k => k -> EnumSet k -> (EnumSet k, EnumSet k) Source #

splitMember :: forall k. Enum k => k -> EnumSet k -> (EnumSet k, Bool, EnumSet k) Source #

# Map

map :: forall k k'. (Enum k, Enum k') => (k -> k') -> EnumSet k -> EnumSet k' Source #

# Folds

foldr :: forall k b. Enum k => (k -> b -> b) -> b -> EnumSet k -> b Source #

foldl :: forall k a. Enum k => (a -> k -> a) -> a -> EnumSet k -> a Source #

# Strict folds

foldr' :: forall k b. Enum k => (k -> b -> b) -> b -> EnumSet k -> b Source #

foldl' :: forall k a. Enum k => (a -> k -> a) -> a -> EnumSet k -> a Source #

# Min/Max

findMin :: forall k. Enum k => EnumSet k -> k Source #

findMax :: forall k. Enum k => EnumSet k -> k Source #

deleteMin :: forall k. EnumSet k -> EnumSet k Source #

deleteMax :: forall k. EnumSet k -> EnumSet k Source #

deleteFindMin :: forall k. Enum k => EnumSet k -> (k, EnumSet k) Source #

deleteFindMax :: forall k. Enum k => EnumSet k -> (k, EnumSet k) Source #

maxView :: forall k. Enum k => EnumSet k -> Maybe (k, EnumSet k) Source #

minView :: forall k. Enum k => EnumSet k -> Maybe (k, EnumSet k) Source #

# Conversion: List

elems :: forall k. Enum k => EnumSet k -> [k] Source #

toList :: forall k. Enum k => EnumSet k -> [k] Source #

fromList :: forall k. Enum k => [k] -> EnumSet k Source #

# Conversion: Ordered list

toAscList :: forall k. Enum k => EnumSet k -> [k] Source #

toDescList :: forall k. Enum k => EnumSet k -> [k] Source #

fromAscList :: forall k. Enum k => [k] -> EnumSet k Source #

fromDistinctAscList :: forall k. Enum k => [k] -> EnumSet k Source #

# Debugging

showTree :: forall k. EnumSet k -> String Source #

showTreeWith :: forall k. Bool -> Bool -> EnumSet k -> String Source #