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

Copyright(c) 2011-2013 Michal Terepeta
LicenseBSD3
Maintainermichal.terepeta@gmail.com
Stabilityalpha
Portabilityuses DeriveDataTypeable and GeneralizedNewtypeDeriving
Safe HaskellNone
LanguageHaskell98

Data.EnumSet

Contents

Description

 

Synopsis

Documentation

data EnumSet k Source

Wrapper for IntSet with Enum elements.

Instances

Eq (EnumSet k) 
Ord (EnumSet k) 
(Enum k, Read k) => Read (EnumSet k) 
(Enum k, Show k) => Show (EnumSet k) 
Monoid (EnumSet k) 
NFData (EnumSet k) 
Typeable (* -> *) EnumSet 

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