byte-containers-0.1.0.1: Sets and maps with 8-bit words for keys
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Map.Word8

Synopsis

Documentation

data Map a Source #

A map whose keys are 8-bit words.

Instances

Instances details
Functor Map Source # 
Instance details

Defined in Data.Map.Word8

Methods

fmap :: (a -> b) -> Map a -> Map b #

(<$) :: a -> Map b -> Map a #

Semigroup a => Monoid (Map a) Source # 
Instance details

Defined in Data.Map.Word8

Methods

mempty :: Map a #

mappend :: Map a -> Map a -> Map a #

mconcat :: [Map a] -> Map a #

Semigroup a => Semigroup (Map a) Source # 
Instance details

Defined in Data.Map.Word8

Methods

(<>) :: Map a -> Map a -> Map a #

sconcat :: NonEmpty (Map a) -> Map a #

stimes :: Integral b => b -> Map a -> Map a #

Show a => Show (Map a) Source # 
Instance details

Defined in Data.Map.Word8

Methods

showsPrec :: Int -> Map a -> ShowS #

show :: Map a -> String #

showList :: [Map a] -> ShowS #

Eq a => Eq (Map a) Source # 
Instance details

Defined in Data.Map.Word8

Methods

(==) :: Map a -> Map a -> Bool #

(/=) :: Map a -> Map a -> Bool #

lookup :: Word8 -> Map a -> Maybe a Source #

Lookup the value at a key in the map.

null :: Map a -> Bool Source #

Is the passed map empty?

size :: Map a -> Int Source #

The number of elements the passed map contains.

empty :: Map a Source #

The empty map.

singleton :: Word8 -> a -> Map a Source #

union :: Map a -> Map a -> Map a Source #

The expression union t1 t2 takes the left-biased union of t1 and t2. It prefers t1 when duplicate keys are encountered (i.e. union == unionWith const).

unionWith :: (a -> a -> a) -> Map a -> Map a -> Map a Source #

Union with a combining function.

insert :: Word8 -> a -> Map a -> Map a Source #

insertWith :: (a -> a -> a) -> Word8 -> a -> Map a -> Map a Source #

Insert with a function, combining new value and old value. insertWith f key value mp will insert the pair (key, value) into mp if key does not exist in the map. If the key does exist, the function will insert the pair (key, f new_value old_value).

foldrWithKeys :: (Word8 -> a -> b -> b) -> b -> Map a -> b Source #

foldl' :: (b -> a -> b) -> b -> Map a -> b Source #

traverse_ :: Applicative m => (a -> m b) -> Map a -> m () Source #

toList :: Map a -> [(Word8, a)] Source #

fromList :: [(Word8, a)] -> Map a Source #