Safe Haskell | None |
---|---|
Language | Haskell2010 |
A map represented as an "association list" of key-value pairs.
Synopsis
- data Map k v
- singleton :: k -> v -> Map k v
- empty :: Map k v
- null :: Map k v -> Bool
- fromList :: [(k, v)] -> Map k v
- toList :: Map k v -> [(k, v)]
- keys :: Map k v -> [k]
- elems :: Map k v -> [v]
- lookup :: forall k v. Eq k => k -> Map k v -> Maybe v
- member :: forall k v. Eq k => k -> Map k v -> Bool
- insert :: forall k v. Eq k => k -> v -> Map k v -> Map k v
- delete :: forall k v. Eq k => k -> Map k v -> Map k v
- union :: forall k v r. Eq k => Map k v -> Map k r -> Map k (These v r)
- unionWith :: forall k a. Eq k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
- filter :: (v -> Bool) -> Map k v -> Map k v
- mapWithKey :: (k -> a -> b) -> Map k a -> Map k b
- mapMaybe :: (a -> Maybe b) -> Map k a -> Map k b
- mapMaybeWithKey :: (k -> a -> Maybe b) -> Map k a -> Map k b
- all :: Foldable t => (a -> Bool) -> t a -> Bool
- mapThese :: (v -> These a b) -> Map k v -> (Map k a, Map k b)
Documentation
A Map
of key-value pairs.
Instances
Lift DefaultUni [(k, v)] => Lift DefaultUni (Map k v) Source # | |
Functor (Map k) Source # | |
Foldable (Map k) Source # | |
Traversable (Map k) Source # | |
Defined in PlutusTx.AssocMap | |
(Eq k, Eq v) => Eq (Map k v) Source # | |
(Data k, Data v) => Data (Map k v) Source # | |
Defined in PlutusTx.AssocMap gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Map k v -> c (Map k v) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Map k v) Source # toConstr :: Map k v -> Constr Source # dataTypeOf :: Map k v -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Map k v)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Map k v)) Source # gmapT :: (forall b. Data b => b -> b) -> Map k v -> Map k v Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Map k v -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Map k v -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Map k v -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Map k v -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Map k v -> m (Map k v) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k v -> m (Map k v) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Map k v -> m (Map k v) Source # | |
(Show k, Show v) => Show (Map k v) Source # | |
Generic (Map k v) Source # | |
(NFData k, NFData v) => NFData (Map k v) Source # | |
Defined in PlutusTx.AssocMap | |
(Pretty k, Pretty v) => Pretty (Map k v) Source # | |
Defined in PlutusTx.AssocMap prettyList :: [Map k v] -> Doc ann | |
(Eq k, Eq v) => Eq (Map k v) Source # | |
(Ord k, Ord v) => Ord (Map k v) Source # | |
(Eq k, Semigroup v) => Semigroup (Map k v) Source # | |
(Eq k, Semigroup v) => Monoid (Map k v) Source # | |
Defined in PlutusTx.AssocMap | |
(UnsafeFromData k, UnsafeFromData v) => UnsafeFromData (Map k v) Source # | |
Defined in PlutusTx.AssocMap unsafeFromBuiltinData :: BuiltinData -> Map k v Source # | |
(FromData k, FromData v) => FromData (Map k v) Source # | |
Defined in PlutusTx.AssocMap fromBuiltinData :: BuiltinData -> Maybe (Map k v) Source # | |
(ToData k, ToData v) => ToData (Map k v) Source # | |
Defined in PlutusTx.AssocMap toBuiltinData :: Map k v -> BuiltinData Source # | |
Typeable DefaultUni Map Source # | |
type Rep (Map k v) Source # | |
Defined in PlutusTx.AssocMap |
elems :: Map k v -> [v] Source #
Return all elements of the map in the ascending order of their keys.
unionWith :: forall k a. Eq k => (a -> a -> a) -> Map k a -> Map k a -> Map k a Source #
Combine two Map
s with the given combination function.
mapWithKey :: (k -> a -> b) -> Map k a -> Map k b Source #
Map a function over all values in the map.
mapMaybe :: (a -> Maybe b) -> Map k a -> Map k b Source #
Map keys/values and collect the Just
results.