primitive-containers-0.3.1: containers backed by arrays

Safe HaskellNone
LanguageHaskell2010

Data.Diet.Map.Strict.Lifted.Lifted

Contents

Synopsis

Documentation

data Map k v Source #

Instances
(Ord k, Enum k, Eq v) => IsList (Map k v) Source # 
Instance details

Defined in Data.Diet.Map.Strict.Lifted.Lifted

Associated Types

type Item (Map k v) :: Type #

Methods

fromList :: [Item (Map k v)] -> Map k v #

fromListN :: Int -> [Item (Map k v)] -> Map k v #

toList :: Map k v -> [Item (Map k v)] #

(Eq k, Eq v) => Eq (Map k v) Source # 
Instance details

Defined in Data.Diet.Map.Strict.Lifted.Lifted

Methods

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

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

(Show k, Show v) => Show (Map k v) Source # 
Instance details

Defined in Data.Diet.Map.Strict.Lifted.Lifted

Methods

showsPrec :: Int -> Map k v -> ShowS #

show :: Map k v -> String #

showList :: [Map k v] -> ShowS #

(Ord k, Enum k, Semigroup v, Eq v) => Semigroup (Map k v) Source # 
Instance details

Defined in Data.Diet.Map.Strict.Lifted.Lifted

Methods

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

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

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

(Ord k, Enum k, Semigroup v, Eq v) => Monoid (Map k v) Source # 
Instance details

Defined in Data.Diet.Map.Strict.Lifted.Lifted

Methods

mempty :: Map k v #

mappend :: Map k v -> Map k v -> Map k v #

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

type Item (Map k v) Source # 
Instance details

Defined in Data.Diet.Map.Strict.Lifted.Lifted

type Item (Map k v) = (k, k, v)

singleton Source #

Arguments

:: Ord k 
=> k

inclusive lower bound

-> k

inclusive upper bound

-> v

value

-> Map k v 

O(1) Create a diet map with a single element.

lookup :: Ord k => k -> Map k v -> Maybe v Source #

O(log n) Lookup the value at a key in the map.

List Conversion

fromList :: (Ord k, Enum k, Eq v) => [(k, k, v)] -> Map k v Source #

fromListAppend :: (Ord k, Enum k, Semigroup v, Eq v) => [(k, k, v)] -> Map k v Source #

fromListN Source #

Arguments

:: (Ord k, Enum k, Eq v) 
=> Int

expected size of resulting Map

-> [(k, k, v)]

key-value pairs

-> Map k v 

fromListAppendN Source #

Arguments

:: (Ord k, Enum k, Semigroup v, Eq v) 
=> Int

expected size of resulting Map

-> [(k, k, v)]

key-value pairs

-> Map k v