plutus-tx-1.0.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellNone
LanguageHaskell2010

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

Methods

lift :: Map k v -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) Source #

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

Methods

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

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

(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

Methods

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

show :: Map k v -> String Source #

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

Generic (Map k v) Source # 
Instance details

Defined in PlutusTx.AssocMap

Associated Types

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

Methods

from :: Map k v -> Rep (Map k v) x Source #

to :: Rep (Map k v) x -> Map k v 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

Methods

pretty :: Map k v -> Doc ann

prettyList :: [Map k v] -> Doc ann

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

Defined in PlutusTx.AssocMap

Methods

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

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

Defined in PlutusTx.AssocMap

Methods

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

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

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

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

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

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

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

(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

Methods

mempty :: Map k v Source #

(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

Methods

typeRep :: Proxy Map -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) Source #

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-CTJpb0OSKTj2IwExKen56o" '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.

empty :: Map k v Source #

An empty Map.

null :: Map k v -> Bool Source #

Is the map empty?

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

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 Maps.

unionWith :: forall k a. Eq k => (a -> a -> a) -> Map k a -> Map k a -> Map k a Source #

Combine two Maps 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.