plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe Haskell None
Language Haskell2010

PlutusTx.AssocMap

Description

A map represented as an "association list" of key-value pairs.

Synopsis

Documentation

data Map k v Source #

A Map of key-value pairs.

Instances

Instances details
Lift DefaultUni [(k, v)] => Lift DefaultUni ( Map k v) Source #
Instance details

Defined in PlutusTx.AssocMap

Functor ( Map k) Source #
Instance details

Defined in PlutusTx.AssocMap

Methods

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

Foldable ( Map k) Source #
Instance details

Defined in PlutusTx.AssocMap

Methods

foldMap :: Monoid m => (a -> m) -> Map k a -> m Source #

Traversable ( Map k) Source #
Instance details

Defined in PlutusTx.AssocMap

Methods

traverse :: Applicative f => (a -> f b) -> Map k a -> f ( Map k b) Source #

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

Defined in PlutusTx.AssocMap

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

Defined in PlutusTx.AssocMap

Methods

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 #
Instance details

Defined in PlutusTx.AssocMap

Generic ( Map k v) Source #
Instance details

Defined in PlutusTx.AssocMap

Associated Types

type Rep ( Map k v) :: Type -> Type Source #

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

Defined in PlutusTx.AssocMap

Methods

rnf :: Map k v -> () Source #

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

Defined in PlutusTx.AssocMap

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

Defined in PlutusTx.AssocMap

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

Defined in PlutusTx.AssocMap

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

Defined in PlutusTx.AssocMap

Methods

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

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

Defined in PlutusTx.AssocMap

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

Defined in PlutusTx.AssocMap

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

Defined in PlutusTx.AssocMap

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

Defined in PlutusTx.AssocMap

Typeable DefaultUni Map Source #
Instance details

Defined in PlutusTx.AssocMap

type Rep ( Map k v) Source #
Instance details

Defined in PlutusTx.AssocMap

type Rep ( Map k v) = D1 (' MetaData "Map" "PlutusTx.AssocMap" "plutus-tx-1.0.0.0-4R3edYpC6C632G5Bo91y92" ' True ) ( C1 (' MetaCons "Map" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unMap") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [(k, v)])))

singleton :: k -> v -> Map k v Source #

A singleton map.

null :: Map k v -> Bool Source #

Is the map empty?

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

keys :: Map k v -> [k] Source #

The keys of a Map .

elems :: Map k v -> [v] Source #

Return all elements of the map in the ascending order of their keys.

lookup :: forall k v. Eq k => k -> Map k v -> Maybe v Source #

Find an entry in a Map .

member :: forall k v. Eq k => k -> Map k v -> Bool Source #

Is the key a member of the map?

insert :: forall k v. Eq k => k -> v -> Map k v -> Map k v Source #

delete :: forall k v. Eq k => k -> Map k v -> Map k v Source #

union :: forall k v r. Eq k => Map k v -> Map k r -> Map k ( These v r) Source #

Combine two Map s.

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.

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

Filter all values that satisfy the predicate.

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.

mapMaybeWithKey :: (k -> a -> Maybe b) -> Map k a -> Map k b Source #

Map keys/values and collect the Just results.

all :: Foldable t => (a -> Bool ) -> t a -> Bool Source #

Plutus Tx version of all .

mapThese :: (v -> These a b) -> Map k v -> ( Map k a, Map k b) Source #

A version of mapEither that works with These .