enummapset-0.6.0.3: IntMap and IntSet with Enum keys/elements.

Copyright(c) 2011-2019 Michal Terepeta
(c) 2019-2020 Mikolaj Konarski and others (see git history)
LicenseBSD3
Maintainermikolaj.konarski@funktory.com
Stabilityalpha
Portabilityuses DeriveDataTypeable and GeneralizedNewtypeDeriving
Safe HaskellNone
LanguageHaskell2010

Data.EnumSet

Contents

Description

 
Synopsis

Documentation

data EnumSet k Source #

Wrapper for IntSet with Enum elements.

Instances
Eq (EnumSet k) Source # 
Instance details

Defined in Data.EnumSet

Methods

(==) :: EnumSet k -> EnumSet k -> Bool #

(/=) :: EnumSet k -> EnumSet k -> Bool #

Ord (EnumSet k) Source # 
Instance details

Defined in Data.EnumSet

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 # 
Instance details

Defined in Data.EnumSet

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

Defined in Data.EnumSet

Methods

showsPrec :: Int -> EnumSet k -> ShowS #

show :: EnumSet k -> String #

showList :: [EnumSet k] -> ShowS #

Semigroup (EnumSet k) Source # 
Instance details

Defined in Data.EnumSet

Methods

(<>) :: EnumSet k -> EnumSet k -> EnumSet k #

sconcat :: NonEmpty (EnumSet k) -> EnumSet k #

stimes :: Integral b => b -> EnumSet k -> EnumSet k #

Monoid (EnumSet k) Source # 
Instance details

Defined in Data.EnumSet

Methods

mempty :: EnumSet k #

mappend :: EnumSet k -> EnumSet k -> EnumSet k #

mconcat :: [EnumSet k] -> EnumSet k #

NFData (EnumSet k) Source # 
Instance details

Defined in Data.EnumSet

Methods

rnf :: EnumSet k -> () #

Wrapping/unwrapping

Operators

Query

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

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

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

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

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

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

Construction

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

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

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

Combine

Filter

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

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

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

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

Map

map :: Enum k => (k -> k) -> EnumSet k -> EnumSet k Source #

Folds

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

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

Strict folds

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

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

Legacy folds

fold :: Enum k => (k -> b -> b) -> b -> EnumSet k -> b Source #

Min/Max

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

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

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

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

Conversion

List

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

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

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

Ordered list

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

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

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