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

Safe HaskellTrustworthy
LanguageHaskell2010

Data.EnumMap.Lazy

Contents

Description

Synopsis

Documentation

newtype EnumMap k v infixr 1 Source #

Constructors

EnumMap infixr 1 

Fields

Instances
Functor (EnumMap k) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

fmap :: (a -> b) -> EnumMap k a -> EnumMap k b #

(<$) :: a -> EnumMap k b -> EnumMap k a #

Foldable (EnumMap k) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

fold :: Monoid m => EnumMap k m -> m #

foldMap :: Monoid m => (a -> m) -> EnumMap k a -> m #

foldr :: (a -> b -> b) -> b -> EnumMap k a -> b #

foldr' :: (a -> b -> b) -> b -> EnumMap k a -> b #

foldl :: (b -> a -> b) -> b -> EnumMap k a -> b #

foldl' :: (b -> a -> b) -> b -> EnumMap k a -> b #

foldr1 :: (a -> a -> a) -> EnumMap k a -> a #

foldl1 :: (a -> a -> a) -> EnumMap k a -> a #

toList :: EnumMap k a -> [a] #

null :: EnumMap k a -> Bool #

length :: EnumMap k a -> Int #

elem :: Eq a => a -> EnumMap k a -> Bool #

maximum :: Ord a => EnumMap k a -> a #

minimum :: Ord a => EnumMap k a -> a #

sum :: Num a => EnumMap k a -> a #

product :: Num a => EnumMap k a -> a #

Traversable (EnumMap k) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

traverse :: Applicative f => (a -> f b) -> EnumMap k a -> f (EnumMap k b) #

sequenceA :: Applicative f => EnumMap k (f a) -> f (EnumMap k a) #

mapM :: Monad m => (a -> m b) -> EnumMap k a -> m (EnumMap k b) #

sequence :: Monad m => EnumMap k (m a) -> m (EnumMap k a) #

Eq v => Eq (EnumMap k v) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

(==) :: EnumMap k v -> EnumMap k v -> Bool #

(/=) :: EnumMap k v -> EnumMap k v -> Bool #

(Data k, Data v) => Data (EnumMap k v) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

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

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

toConstr :: EnumMap k v -> Constr #

dataTypeOf :: EnumMap k v -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord v => Ord (EnumMap k v) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

compare :: EnumMap k v -> EnumMap k v -> Ordering #

(<) :: EnumMap k v -> EnumMap k v -> Bool #

(<=) :: EnumMap k v -> EnumMap k v -> Bool #

(>) :: EnumMap k v -> EnumMap k v -> Bool #

(>=) :: EnumMap k v -> EnumMap k v -> Bool #

max :: EnumMap k v -> EnumMap k v -> EnumMap k v #

min :: EnumMap k v -> EnumMap k v -> EnumMap k v #

(Enum k, Read k, Read a) => Read (EnumMap k a) Source # 
Instance details

Defined in Data.EnumMap.Lazy

(Enum k, Show k, Show a) => Show (EnumMap k a) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

showsPrec :: Int -> EnumMap k a -> ShowS #

show :: EnumMap k a -> String #

showList :: [EnumMap k a] -> ShowS #

Semigroup (EnumMap k v) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

(<>) :: EnumMap k v -> EnumMap k v -> EnumMap k v #

sconcat :: NonEmpty (EnumMap k v) -> EnumMap k v #

stimes :: Integral b => b -> EnumMap k v -> EnumMap k v #

Monoid (EnumMap k v) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

mempty :: EnumMap k v #

mappend :: EnumMap k v -> EnumMap k v -> EnumMap k v #

mconcat :: [EnumMap k v] -> EnumMap k v #

NFData v => NFData (EnumMap k v) Source # 
Instance details

Defined in Data.EnumMap.Lazy

Methods

rnf :: EnumMap k v -> () #

Operators

(!) :: forall k (a :: Type). Enum k => EnumMap k a -> k -> a Source #

(\\) :: forall k (a :: Type) (b :: Type). EnumMap k a -> EnumMap k b -> EnumMap k a Source #

Query

null :: forall k (a :: Type). EnumMap k a -> Bool Source #

size :: forall k (a :: Type). EnumMap k a -> Int Source #

member :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Bool Source #

notMember :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Bool Source #

lookup :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe a Source #

findWithDefault :: forall k (a :: Type). Enum k => a -> k -> EnumMap k a -> a Source #

lookupLT :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe (k, a) Source #

lookupGT :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe (k, a) Source #

lookupLE :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe (k, a) Source #

lookupGE :: forall k (a :: Type). Enum k => k -> EnumMap k a -> Maybe (k, a) Source #

Construction

empty :: forall k (a :: Type). EnumMap k a Source #

singleton :: forall k (a :: Type). Enum k => k -> a -> EnumMap k a Source #

Insertion

insert :: forall k (a :: Type). Enum k => k -> a -> EnumMap k a -> EnumMap k a Source #

insertWith :: forall k (a :: Type). Enum k => (a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a Source #

insertWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> EnumMap k a Source #

insertLookupWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> k -> a -> EnumMap k a -> (Maybe a, EnumMap k a) Source #

Delete/Update

delete :: forall k (a :: Type). Enum k => k -> EnumMap k a -> EnumMap k a Source #

adjust :: forall k (a :: Type). Enum k => (a -> a) -> k -> EnumMap k a -> EnumMap k a Source #

adjustWithKey :: forall k (a :: Type). Enum k => (k -> a -> a) -> k -> EnumMap k a -> EnumMap k a Source #

update :: forall k (a :: Type). Enum k => (a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #

updateWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #

updateLookupWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> k -> EnumMap k a -> (Maybe a, EnumMap k a) Source #

alter :: forall k (a :: Type). Enum k => (Maybe a -> Maybe a) -> k -> EnumMap k a -> EnumMap k a Source #

Combine: Union

union :: forall k (a :: Type). EnumMap k a -> EnumMap k a -> EnumMap k a Source #

unionWith :: forall k (a :: Type). (a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a Source #

unionWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> EnumMap k a -> EnumMap k a -> EnumMap k a Source #

unions :: forall k (f :: Type -> Type) (a :: Type). (Functor f, Foldable f) => f (EnumMap k a) -> EnumMap k a Source #

unionsWith :: forall k (f :: Type -> Type) (a :: Type). (Functor f, Foldable f) => (a -> a -> a) -> f (EnumMap k a) -> EnumMap k a Source #

Combine: Difference

difference :: forall k (a :: Type) (b :: Type). EnumMap k a -> EnumMap k b -> EnumMap k a Source #

differenceWith :: forall k (a :: Type) (b :: Type). (a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a Source #

differenceWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> Maybe a) -> EnumMap k a -> EnumMap k b -> EnumMap k a Source #

Combine: Intersection

intersection :: forall k (a :: Type) (b :: Type). EnumMap k a -> EnumMap k b -> EnumMap k a Source #

intersectionWith :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c Source #

intersectionWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (k -> a -> b -> c) -> EnumMap k a -> EnumMap k b -> EnumMap k c Source #

Combine: Universal combining function

mergeWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (k -> a -> b -> Maybe c) -> (EnumMap k a -> EnumMap k c) -> (EnumMap k b -> EnumMap k c) -> EnumMap k a -> EnumMap k b -> EnumMap k c Source #

Traversal: Map

map :: forall k (a :: Type) (b :: Type). (a -> b) -> EnumMap k a -> EnumMap k b Source #

mapWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b) -> EnumMap k a -> EnumMap k b Source #

traverseWithKey :: forall k (t :: Type -> Type) (a :: Type) (b :: Type). (Enum k, Functor t, Applicative t) => (k -> a -> t b) -> EnumMap k a -> t (EnumMap k b) Source #

mapAccum :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c) Source #

mapAccumWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c) Source #

mapAccumRWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (a -> k -> b -> (a, c)) -> a -> EnumMap k b -> (a, EnumMap k c) Source #

mapKeys :: forall k k' (a :: Type). (Enum k, Enum k') => (k -> k') -> EnumMap k a -> EnumMap k' a Source #

mapKeysWith :: forall k k' (a :: Type). (Enum k, Enum k') => (a -> a -> a) -> (k -> k') -> EnumMap k a -> EnumMap k' a Source #

mapKeysMonotonic :: forall k k' (a :: Type). (Enum k, Enum k') => (k -> k') -> EnumMap k a -> EnumMap k' a Source #

Traversal: Folds

foldr :: forall k (a :: Type) (b :: Type). (a -> b -> b) -> b -> EnumMap k a -> b Source #

foldl :: forall k (a :: Type) (b :: Type). (a -> b -> a) -> a -> EnumMap k b -> a Source #

foldrWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b Source #

foldlWithKey :: forall k (a :: Type) (b :: Type). Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a Source #

foldMapWithKey :: forall k (m :: Type) (a :: Type). (Enum k, Monoid m) => (k -> a -> m) -> EnumMap k a -> m Source #

Traversal: Strict folds

foldr' :: forall k (a :: Type) (b :: Type). (a -> b -> b) -> b -> EnumMap k a -> b Source #

foldl' :: forall k (a :: Type) (b :: Type). (a -> b -> a) -> a -> EnumMap k b -> a Source #

foldrWithKey' :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> b -> b) -> b -> EnumMap k a -> b Source #

foldlWithKey' :: forall k (a :: Type) (b :: Type). Enum k => (a -> k -> b -> a) -> a -> EnumMap k b -> a Source #

Conversion

elems :: forall k (a :: Type). EnumMap k a -> [a] Source #

keys :: forall k (a :: Type). Enum k => EnumMap k a -> [k] Source #

assocs :: forall k (a :: Type). Enum k => EnumMap k a -> [(k, a)] Source #

keysSet :: forall k (a :: Type). EnumMap k a -> EnumSet k Source #

fromSet :: forall k (a :: Type). Enum k => (k -> a) -> EnumSet k -> EnumMap k a Source #

Conversion: Lists

toList :: forall k (a :: Type). Enum k => EnumMap k a -> [(k, a)] Source #

fromList :: forall k (a :: Type). Enum k => [(k, a)] -> EnumMap k a Source #

fromListWith :: forall k (a :: Type). Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a Source #

fromListWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a Source #

Conversion: Ordered lists

toAscList :: forall k (a :: Type). Enum k => EnumMap k a -> [(k, a)] Source #

toDescList :: forall k (a :: Type). Enum k => EnumMap k a -> [(k, a)] Source #

fromAscList :: forall k (a :: Type). Enum k => [(k, a)] -> EnumMap k a Source #

fromAscListWith :: forall k (a :: Type). Enum k => (a -> a -> a) -> [(k, a)] -> EnumMap k a Source #

fromAscListWithKey :: forall k (a :: Type). Enum k => (k -> a -> a -> a) -> [(k, a)] -> EnumMap k a Source #

fromDistinctAscList :: forall k (a :: Type). Enum k => [(k, a)] -> EnumMap k a Source #

Filter

filter :: forall k (a :: Type). (a -> Bool) -> EnumMap k a -> EnumMap k a Source #

filterWithKey :: forall k (a :: Type). Enum k => (k -> a -> Bool) -> EnumMap k a -> EnumMap k a Source #

partition :: forall k (a :: Type). (a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a) Source #

partitionWithKey :: forall k (a :: Type). Enum k => (k -> a -> Bool) -> EnumMap k a -> (EnumMap k a, EnumMap k a) Source #

mapMaybe :: forall k (a :: Type) (b :: Type). (a -> Maybe b) -> EnumMap k a -> EnumMap k b Source #

mapMaybeWithKey :: forall k (a :: Type) (b :: Type). Enum k => (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b Source #

mapEither :: forall k (a :: Type) (b :: Type) (c :: Type). (a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c) Source #

mapEitherWithKey :: forall k (a :: Type) (b :: Type) (c :: Type). Enum k => (k -> a -> Either b c) -> EnumMap k a -> (EnumMap k b, EnumMap k c) Source #

split :: forall k (a :: Type). Enum k => k -> EnumMap k a -> (EnumMap k a, EnumMap k a) Source #

splitLookup :: forall k (a :: Type). Enum k => k -> EnumMap k a -> (EnumMap k a, Maybe a, EnumMap k a) Source #

Submap

isSubmapOf :: forall k (a :: Type). Eq a => EnumMap k a -> EnumMap k a -> Bool Source #

isSubmapOfBy :: forall k (a :: Type) (b :: Type). (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool Source #

isProperSubmapOf :: forall k (a :: Type). Eq a => EnumMap k a -> EnumMap k a -> Bool Source #

isProperSubmapOfBy :: forall k (a :: Type) (b :: Type). (a -> b -> Bool) -> EnumMap k a -> EnumMap k b -> Bool Source #

Min/Max

findMin :: forall k (a :: Type). Enum k => EnumMap k a -> (k, a) Source #

findMax :: forall k (a :: Type). Enum k => EnumMap k a -> (k, a) Source #

deleteMin :: forall k (a :: Type). EnumMap k a -> EnumMap k a Source #

deleteMax :: forall k (a :: Type). EnumMap k a -> EnumMap k a Source #

deleteFindMin :: forall k (a :: Type). Enum k => EnumMap k a -> ((k, a), EnumMap k a) Source #

deleteFindMax :: forall k (a :: Type). Enum k => EnumMap k a -> ((k, a), EnumMap k a) Source #

updateMin :: forall k (a :: Type). (a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #

updateMax :: forall k (a :: Type). (a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #

updateMinWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #

updateMaxWithKey :: forall k (a :: Type). Enum k => (k -> a -> Maybe a) -> EnumMap k a -> EnumMap k a Source #

minView :: forall k (a :: Type). EnumMap k a -> Maybe (a, EnumMap k a) Source #

maxView :: forall k (a :: Type). EnumMap k a -> Maybe (a, EnumMap k a) Source #

minViewWithKey :: forall k (a :: Type). Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a) Source #

maxViewWithKey :: forall k (a :: Type). Enum k => EnumMap k a -> Maybe ((k, a), EnumMap k a) Source #

Debugging

showTree :: forall k (a :: Type). Show a => EnumMap k a -> String Source #

showTreeWith :: forall k (a :: Type). Show a => Bool -> Bool -> EnumMap k a -> String Source #