primitive-containers-0.3.1: containers backed by arrays

Safe HaskellNone
LanguageHaskell2010

Data.Dependent.Map.Unboxed.Lifted

Contents

Synopsis

Documentation

data Map k v Source #

Instances
(Universally k Prim, ApplyUniversally k Prim, OrdForallPoly k) => IsList (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.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)] #

(Universally k Prim, ApplyUniversally k Prim, EqForallPoly k, ToSing k, EqForeach v) => Eq (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.Lifted

Methods

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

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

(Universally k Prim, ApplyUniversally k Prim, OrdForallPoly k, ToSing k, OrdForeach v) => Ord (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.Lifted

Methods

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

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

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

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

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

max :: Map k v -> Map k v -> Map k v #

min :: Map k v -> Map k v -> Map k v #

(Universally k Prim, ApplyUniversally k Prim, ShowForall k, ToSing k, ShowForeach v) => Show (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.Lifted

Methods

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

show :: Map k v -> String #

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

(ApplyUniversally k Prim, Universally k Prim, ToSing k, OrdForallPoly k, SemigroupForeach v) => Semigroup (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.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 #

(ApplyUniversally k Prim, Universally k Prim, ToSing k, OrdForallPoly k, SemigroupForeach v) => Monoid (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.Lifted

Methods

mempty :: Map k v #

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

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

(Universally k Prim, ToSing k, ToJSONKeyForall k, ToJSONForeach v) => ToJSON (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.Lifted

Methods

toJSON :: Map k v -> Value #

toEncoding :: Map k v -> Encoding #

toJSONList :: [Map k v] -> Value #

toEncodingList :: [Map k v] -> Encoding #

(Universally k Prim, ApplyUniversally k Prim, ToSing k, FromJSONKeyExists k, FromJSONForeach v, OrdForallPoly k) => FromJSON (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.Lifted

Methods

parseJSON :: Value -> Parser (Map k v) #

parseJSONList :: Value -> Parser [Map k v] #

type Item (Map k v) Source # 
Instance details

Defined in Data.Dependent.Map.Unboxed.Lifted

type Item (Map k v) = DependentPair k v

empty :: Map k v Source #

null :: Map k v -> Bool Source #

singleton :: Universally k Prim => k a -> v a -> Map k v Source #

foldrWithKey :: Universally k Prim => (forall a. k a -> v a -> b -> b) -> b -> Map k v -> b Source #

foldlWithKeyM' :: (Universally k Prim, Monad m) => (forall a. b -> k a -> v a -> m b) -> b -> Map k v -> m b Source #

foldMapWithKey :: (Universally k Prim, Monoid m) => (forall a. k a -> v a -> m) -> Map k v -> m Source #

traverseWithKey_ :: (Universally k Prim, Applicative m) => (forall a. k a -> v a -> m b) -> Map k v -> m () Source #

map :: Universally k Prim => (forall a. v a -> w a) -> Map k v -> Map k w Source #

mapWithKey :: Universally k Prim => (forall a. k a -> v a -> w a) -> Map k v -> Map k w Source #

mapMaybe :: Universally k Prim => (forall a. v a -> Maybe (w a)) -> Map k v -> Map k w Source #

mapMaybeWithKey :: Universally k Prim => (forall a. k a -> v a -> Maybe (w a)) -> Map k v -> Map k w Source #

size :: Map k v -> Int Source #

Unsafe Functions

unsafeFreezeZip :: (Universally k Prim, OrdForallPoly k) => MutablePrimArray s (k Any) -> MutableArray s (v Any) -> ST s (Map k v) Source #

This function is even more unsafe than the unsafeFreezeZip provided by Data.Map.Unboxed.Lifted. The user needs to use unsafeCoerce to even use this function.

unsafeCoerceKeys :: Proxy k' -> Map k v -> Set k' Source #

O(1) This function is highly unsafe. The user is responsible for ensuring that:

  • Both k' and forall a. k a have the same runtime representation.
  • The Ord instance for k' agrees with the OrdForallPoly instance for k.