cardano-data-1.2.3.1: Specialized data for Cardano project
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.ListMap

Synopsis

Documentation

newtype ListMap k v Source #

ListMap is a wrapper around an associative list. It is encoded in CBOR and JSON as an object/map.

Constructors

ListMap 

Fields

Instances

Instances details
Bifunctor ListMap Source # 
Instance details

Defined in Data.ListMap

Methods

bimap ∷ (a → b) → (c → d) → ListMap a c → ListMap b d Source #

first ∷ (a → b) → ListMap a c → ListMap b c Source #

second ∷ (b → c) → ListMap a b → ListMap a c Source #

Generic1 (ListMap k ∷ TypeTYPE LiftedRep) Source # 
Instance details

Defined in Data.ListMap

Associated Types

type Rep1 (ListMap k) ∷ k → Type Source #

Methods

from1 ∷ ∀ (a ∷ k0). ListMap k a → Rep1 (ListMap k) a Source #

to1 ∷ ∀ (a ∷ k0). Rep1 (ListMap k) a → ListMap k a Source #

(FromJSON k, FromJSONKey k) ⇒ FromJSON1 (ListMap k) Source # 
Instance details

Defined in Data.ListMap

Methods

liftParseJSONMaybe a → (ValueParser a) → (ValueParser [a]) → ValueParser (ListMap k a) Source #

liftParseJSONListMaybe a → (ValueParser a) → (ValueParser [a]) → ValueParser [ListMap k a] Source #

liftOmittedFieldMaybe a → Maybe (ListMap k a) Source #

ToJSONKey k ⇒ ToJSON1 (ListMap k) Source # 
Instance details

Defined in Data.ListMap

Methods

liftToJSON ∷ (a → Bool) → (a → Value) → ([a] → Value) → ListMap k a → Value Source #

liftToJSONList ∷ (a → Bool) → (a → Value) → ([a] → Value) → [ListMap k a] → Value Source #

liftToEncoding ∷ (a → Bool) → (a → Encoding) → ([a] → Encoding) → ListMap k a → Encoding Source #

liftToEncodingList ∷ (a → Bool) → (a → Encoding) → ([a] → Encoding) → [ListMap k a] → Encoding Source #

liftOmitField ∷ (a → Bool) → ListMap k a → Bool Source #

Foldable (ListMap k) Source # 
Instance details

Defined in Data.ListMap

Methods

foldMonoid m ⇒ ListMap k m → m Source #

foldMapMonoid m ⇒ (a → m) → ListMap k a → m Source #

foldMap'Monoid m ⇒ (a → m) → ListMap k a → m Source #

foldr ∷ (a → b → b) → b → ListMap k a → b Source #

foldr' ∷ (a → b → b) → b → ListMap k a → b Source #

foldl ∷ (b → a → b) → b → ListMap k a → b Source #

foldl' ∷ (b → a → b) → b → ListMap k a → b Source #

foldr1 ∷ (a → a → a) → ListMap k a → a Source #

foldl1 ∷ (a → a → a) → ListMap k a → a Source #

toListListMap k a → [a] Source #

nullListMap k a → Bool Source #

lengthListMap k a → Int Source #

elemEq a ⇒ a → ListMap k a → Bool Source #

maximumOrd a ⇒ ListMap k a → a Source #

minimumOrd a ⇒ ListMap k a → a Source #

sumNum a ⇒ ListMap k a → a Source #

productNum a ⇒ ListMap k a → a Source #

Functor (ListMap k) Source # 
Instance details

Defined in Data.ListMap

Methods

fmap ∷ (a → b) → ListMap k a → ListMap k b Source #

(<$) ∷ a → ListMap k b → ListMap k a Source #

NFData k ⇒ NFData1 (ListMap k) Source # 
Instance details

Defined in Data.ListMap

Methods

liftRnf ∷ (a → ()) → ListMap k a → () Source #

(FromJSON v, FromJSON k, FromJSONKey k) ⇒ FromJSON (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

(ToJSON v, ToJSONKey k) ⇒ ToJSON (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

Monoid (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

Methods

memptyListMap k v Source #

mappendListMap k v → ListMap k v → ListMap k v Source #

mconcat ∷ [ListMap k v] → ListMap k v Source #

Semigroup (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

Methods

(<>)ListMap k v → ListMap k v → ListMap k v Source #

sconcatNonEmpty (ListMap k v) → ListMap k v Source #

stimesIntegral b ⇒ b → ListMap k v → ListMap k v Source #

Generic (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

Associated Types

type Rep (ListMap k v) ∷ TypeType Source #

Methods

fromListMap k v → Rep (ListMap k v) x Source #

toRep (ListMap k v) x → ListMap k v Source #

(Show k, Show v) ⇒ Show (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

Methods

showsPrecIntListMap k v → ShowS Source #

showListMap k v → String Source #

showList ∷ [ListMap k v] → ShowS Source #

(DecCBOR k, DecCBOR v) ⇒ DecCBOR (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

Methods

decCBORDecoder s (ListMap k v) Source #

dropCBORProxy (ListMap k v) → Decoder s () Source #

labelProxy (ListMap k v) → Text Source #

(EncCBOR k, EncCBOR v) ⇒ EncCBOR (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

Methods

encCBORListMap k v → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (ListMap k v) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ListMap k v] → Size Source #

(NFData k, NFData v) ⇒ NFData (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

Methods

rnfListMap k v → () Source #

(Ord k, Ord v) ⇒ Eq (ListMap k v) Source #

Eq works similarly to Map

Instance details

Defined in Data.ListMap

Methods

(==)ListMap k v → ListMap k v → Bool Source #

(/=)ListMap k v → ListMap k v → Bool Source #

(NoThunks k, NoThunks v) ⇒ NoThunks (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

type Rep1 (ListMap k ∷ TypeTYPE LiftedRep) Source # 
Instance details

Defined in Data.ListMap

type Rep1 (ListMap k ∷ TypeTYPE LiftedRep) = D1 ('MetaData "ListMap" "Data.ListMap" "cardano-data-1.2.3.1-inplace" 'True) (C1 ('MetaCons "ListMap" 'PrefixI 'True) (S1 ('MetaSel ('Just "unListMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) ([] :.: Rec1 ((,) k))))
type Rep (ListMap k v) Source # 
Instance details

Defined in Data.ListMap

type Rep (ListMap k v) = D1 ('MetaData "ListMap" "Data.ListMap" "cardano-data-1.2.3.1-inplace" 'True) (C1 ('MetaCons "ListMap" 'PrefixI 'True) (S1 ('MetaSel ('Just "unListMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(k, v)])))

foldrWithKey ∷ ((k, a) → b → b) → b → ListMap k a → b Source #

keysListMap k a → [k] Source #

keysSetOrd k ⇒ ListMap k a → Set k Source #

elemsListMap k a → [a] Source #

lookupEq k ⇒ k → ListMap k v → Maybe v Source #

filter ∷ (k → v → Bool) → ListMap k v → ListMap k v Source #

toMapOrd k ⇒ ListMap k v → Map k v Source #

fromMapMap k v → ListMap k v Source #

mapKeys ∷ (k1 → k2) → ListMap k1 a → ListMap k2 a Source #

map ∷ (a → v) → ListMap k a → ListMap k v Source #

fromList ∷ [(k, v)] → ListMap k v Source #

toListListMap k v → [(k, v)] Source #