cardano-ledger-core-0.1.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe Haskell None
Language Haskell2010

Cardano.Ledger.UnifiedMap

Description

A Monomorphic version of UMap specialized to the needs of Cardano

Documentation

data View coin cr pl ptr k v where Source #

Constructors

Rewards :: forall coin cr pl ptr. !( UMap coin cr pl ptr) -> View coin cr pl ptr cr coin
Delegations :: forall coin cr pl ptr. !( UMap coin cr pl ptr) -> View coin cr pl ptr cr pl
Ptrs :: forall coin cr pl ptr. !( UMap coin cr pl ptr) -> View coin cr pl ptr ptr cr

Instances

Instances details
( Ord coin, Ord cred, Ord ptr) => Iter ( View coin cred pool ptr)
Instance details

Defined in Control.Iterate.BaseTypes

Methods

nxt :: View coin cred pool ptr a b -> Collect (a, b, View coin cred pool ptr a b) Source #

lub :: Ord k => k -> View coin cred pool ptr k b -> Collect (k, b, View coin cred pool ptr k b) Source #

hasNxt :: View coin cred pool ptr a b -> Maybe (a, b, View coin cred pool ptr a b) Source #

hasLub :: Ord k => k -> View coin cred pool ptr k b -> Maybe (k, b, View coin cred pool ptr k b) Source #

haskey :: Ord key => key -> View coin cred pool ptr key b -> Bool Source #

isnull :: View coin cred pool ptr k v -> Bool Source #

lookup :: Ord key => key -> View coin cred pool ptr key rng -> Maybe rng Source #

element :: Ord k => k -> View coin cred pool ptr k v -> Collect () Source #

( Monoid coin, Ord coin, Ord cred, Ord ptr, Ord pool) => Basic ( View coin cred pool ptr)
Instance details

Defined in Control.Iterate.BaseTypes

Methods

addpair :: Ord k => k -> v -> View coin cred pool ptr k v -> View coin cred pool ptr k v Source #

addkv :: Ord k => (k, v) -> View coin cred pool ptr k v -> (v -> v -> v) -> View coin cred pool ptr k v Source #

removekey :: Ord k => k -> View coin cred pool ptr k v -> View coin cred pool ptr k v Source #

domain :: Ord k => View coin cred pool ptr k v -> Set k Source #

range :: Ord v => View coin cred pool ptr k v -> Set v Source #

Foldable ( View coin cred pool ptr k)
Instance details

Defined in Data.UMap

Methods

fold :: Monoid m => View coin cred pool ptr k m -> m Source #

foldMap :: Monoid m => (a -> m) -> View coin cred pool ptr k a -> m Source #

foldMap' :: Monoid m => (a -> m) -> View coin cred pool ptr k a -> m Source #

foldr :: (a -> b -> b) -> b -> View coin cred pool ptr k a -> b Source #

foldr' :: (a -> b -> b) -> b -> View coin cred pool ptr k a -> b Source #

foldl :: (b -> a -> b) -> b -> View coin cred pool ptr k a -> b Source #

foldl' :: (b -> a -> b) -> b -> View coin cred pool ptr k a -> b Source #

foldr1 :: (a -> a -> a) -> View coin cred pool ptr k a -> a Source #

foldl1 :: (a -> a -> a) -> View coin cred pool ptr k a -> a Source #

toList :: View coin cred pool ptr k a -> [a] Source #

null :: View coin cred pool ptr k a -> Bool Source #

length :: View coin cred pool ptr k a -> Int Source #

elem :: Eq a => a -> View coin cred pool ptr k a -> Bool Source #

maximum :: Ord a => View coin cred pool ptr k a -> a Source #

minimum :: Ord a => View coin cred pool ptr k a -> a Source #

sum :: Num a => View coin cred pool ptr k a -> a Source #

product :: Num a => View coin cred pool ptr k a -> a Source #

( UnifiedView coin cred pool ptr k v, Monoid coin, Ord k, Ord coin, Ord cred, Ord ptr, Ord pool) => HasQuery ( View coin cred pool ptr k v) k v
Instance details

Defined in Control.Iterate.Exp

Methods

query :: View coin cred pool ptr k v -> Query k v Source #

( UnifiedView coin cred pool ptr k v, Ord k, Monoid coin, Ord coin, Ord cred, Ord ptr, Ord pool) => HasExp ( View coin cred pool ptr k v) ( View coin cred pool ptr k v)
Instance details

Defined in Control.Iterate.Exp

Methods

toExp :: View coin cred pool ptr k v -> Exp ( View coin cred pool ptr k v) Source #

Embed ( View coin cred pool ptr k v) ( View coin cred pool ptr k v)
Instance details

Defined in Control.Iterate.BaseTypes

Methods

toBase :: View coin cred pool ptr k v -> View coin cred pool ptr k v Source #

fromBase :: View coin cred pool ptr k v -> View coin cred pool ptr k v Source #

data UMap coin cred pool ptr Source #

Constructors

UnifiedMap !( Map cred ( Trip coin ptr pool)) !( Map ptr cred)

Instances

Instances details
( Eq cred, Eq pool, Eq ptr, Eq coin) => Eq ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

Methods

(==) :: UMap coin cred pool ptr -> UMap coin cred pool ptr -> Bool Source #

(/=) :: UMap coin cred pool ptr -> UMap coin cred pool ptr -> Bool Source #

( Show cred, Show coin, Show pool, Show ptr) => Show ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

Methods

showsPrec :: Int -> UMap coin cred pool ptr -> ShowS Source #

show :: UMap coin cred pool ptr -> String Source #

showList :: [ UMap coin cred pool ptr] -> ShowS Source #

Generic ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

Associated Types

type Rep ( UMap coin cred pool ptr) :: Type -> Type Source #

Methods

from :: UMap coin cred pool ptr -> Rep ( UMap coin cred pool ptr) x Source #

to :: Rep ( UMap coin cred pool ptr) x -> UMap coin cred pool ptr Source #

( NFData cred, NFData pool, NFData ptr, NFData coin) => NFData ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

Methods

rnf :: UMap coin cred pool ptr -> () Source #

(Tbor coin, Tbor ptr, Tbor cred, ToCBOR pool, Ord ptr) => ToCBOR ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

Methods

toCBOR :: UMap coin cred pool ptr -> Encoding Source #

encodedSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy ( UMap coin cred pool ptr) -> Size Source #

encodedListSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy [ UMap coin cred pool ptr] -> Size Source #

( Ord cred, FromCBOR cred, Ord ptr, FromCBOR ptr, FromCBOR coin, FromCBOR pool) => FromSharedCBOR ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

Associated Types

type Share ( UMap coin cred pool ptr) Source #

Methods

getShare :: UMap coin cred pool ptr -> Share ( UMap coin cred pool ptr) Source #

fromSharedCBOR :: Share ( UMap coin cred pool ptr) -> Decoder s ( UMap coin cred pool ptr) Source #

fromSharedPlusCBOR :: StateT ( Share ( UMap coin cred pool ptr)) ( Decoder s) ( UMap coin cred pool ptr) Source #

( NoThunks cred, NoThunks pool, NoThunks ptr, NoThunks coin) => NoThunks ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

type Rep ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

type Share ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

type Share ( UMap coin cred pool ptr) = ( Interns cred, Interns pool)

data Trip coin ptr pool where Source #

Bundled Patterns

pattern Triple :: StrictMaybe coin -> Set ptr -> StrictMaybe pool -> Trip coin ptr pool

Instances

Instances details
( Eq pool, Eq ptr, Eq coin) => Eq ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

Methods

(==) :: Trip coin ptr pool -> Trip coin ptr pool -> Bool Source #

(/=) :: Trip coin ptr pool -> Trip coin ptr pool -> Bool Source #

( Ord pool, Ord ptr, Ord coin) => Ord ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

Methods

compare :: Trip coin ptr pool -> Trip coin ptr pool -> Ordering Source #

(<) :: Trip coin ptr pool -> Trip coin ptr pool -> Bool Source #

(<=) :: Trip coin ptr pool -> Trip coin ptr pool -> Bool Source #

(>) :: Trip coin ptr pool -> Trip coin ptr pool -> Bool Source #

(>=) :: Trip coin ptr pool -> Trip coin ptr pool -> Bool Source #

max :: Trip coin ptr pool -> Trip coin ptr pool -> Trip coin ptr pool Source #

min :: Trip coin ptr pool -> Trip coin ptr pool -> Trip coin ptr pool Source #

( Show coin, Show pool, Show ptr) => Show ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

Generic ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

Associated Types

type Rep ( Trip coin ptr pool) :: Type -> Type Source #

Methods

from :: Trip coin ptr pool -> Rep ( Trip coin ptr pool) x Source #

to :: Rep ( Trip coin ptr pool) x -> Trip coin ptr pool Source #

( Ord ptr, Monoid coin) => Semigroup ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

Methods

(<>) :: Trip coin ptr pool -> Trip coin ptr pool -> Trip coin ptr pool Source #

sconcat :: NonEmpty ( Trip coin ptr pool) -> Trip coin ptr pool Source #

stimes :: Integral b => b -> Trip coin ptr pool -> Trip coin ptr pool Source #

( Ord ptr, Monoid coin) => Monoid ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

Methods

mempty :: Trip coin ptr pool Source #

mappend :: Trip coin ptr pool -> Trip coin ptr pool -> Trip coin ptr pool Source #

mconcat :: [ Trip coin ptr pool] -> Trip coin ptr pool Source #

( NFData pool, NFData ptr, NFData coin) => NFData ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

Methods

rnf :: Trip coin ptr pool -> () Source #

(Tbor coin, Tbor ptr, Ord ptr, ToCBOR pool) => ToCBOR ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

( FromCBOR coin, Ord ptr, FromCBOR ptr, FromCBOR pool) => FromSharedCBOR ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

Associated Types

type Share ( Trip coin ptr pool) Source #

Methods

getShare :: Trip coin ptr pool -> Share ( Trip coin ptr pool) Source #

fromSharedCBOR :: Share ( Trip coin ptr pool) -> Decoder s ( Trip coin ptr pool) Source #

fromSharedPlusCBOR :: StateT ( Share ( Trip coin ptr pool)) ( Decoder s) ( Trip coin ptr pool) Source #

( NoThunks pool, NoThunks ptr, NoThunks coin) => NoThunks ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

type Rep ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

type Rep ( Trip coin ptr pool) = D1 (' MetaData "Trip" "Data.UMap" "cardano-data-0.1.0.0-9WY2vO9HEhB6K2BmAnACTs" ' False ) ((( C1 (' MetaCons "TEEE" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "TEEF" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 pool))) :+: ( C1 (' MetaCons "TEFE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Set ptr))) :+: C1 (' MetaCons "TEFF" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Set ptr)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 pool)))) :+: (( C1 (' MetaCons "TFEE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 coin)) :+: C1 (' MetaCons "TFEF" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 coin) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 pool))) :+: ( C1 (' MetaCons "TFFE" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 coin) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Set ptr))) :+: C1 (' MetaCons "TFFF" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 coin) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Set ptr)) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 pool))))))
type Share ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

type Share ( Trip coin ptr pool) = Interns pool

data Tag coin cred pool ptr k v where Source #

Constructors

Rew :: forall coin cred pool ptr. Tag coin cred pool ptr cred coin
Del :: forall coin cred pool ptr. Tag coin cred pool ptr cred pool
Ptr :: forall coin cred pool ptr. Tag coin cred pool ptr ptr cred

Orphan instances