Safe Haskell | None |
---|---|
Language | Haskell2010 |
A Monomorphic version of UMap specialized to the needs of Cardano
Documentation
type ViewMap crypto = View Coin ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Ptr Source #
type UnifiedMap crypto = UMap Coin ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Ptr Source #
data View coin cr pl ptr k v where Source #
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
( Ord coin, Ord cred, Ord ptr) => Iter ( View coin cred pool ptr) | |
Defined in Control.Iterate.BaseTypes 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) | |
Defined in Control.Iterate.BaseTypes 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) | |
Defined in Data.UMap 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 | |
( 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) | |
Embed ( View coin cred pool ptr k v) ( View coin cred pool ptr k v) | |
data UMap coin cred pool ptr Source #
UnifiedMap !( Map cred ( Trip coin ptr pool)) !( Map ptr cred) |
Instances
( Eq cred, Eq pool, Eq ptr, Eq coin) => Eq ( UMap coin cred pool ptr) | |
( Show cred, Show coin, Show pool, Show ptr) => Show ( UMap coin cred pool ptr) | |
Generic ( UMap coin cred pool ptr) | |
( NFData cred, NFData pool, NFData ptr, NFData coin) => NFData ( UMap coin cred pool ptr) | |
(Tbor coin, Tbor ptr, Tbor cred, ToCBOR pool, Ord ptr) => ToCBOR ( UMap coin cred pool ptr) | |
Defined in Data.UMap |
|
( Ord cred, FromCBOR cred, Ord ptr, FromCBOR ptr, FromCBOR coin, FromCBOR pool) => FromSharedCBOR ( UMap coin cred pool ptr) | |
( NoThunks cred, NoThunks pool, NoThunks ptr, NoThunks coin) => NoThunks ( UMap coin cred pool ptr) | |
type Rep ( UMap coin cred pool ptr) | |
Defined in Data.UMap
type
Rep
(
UMap
coin cred pool ptr) =
D1
('
MetaData
"UMap" "Data.UMap" "cardano-data-0.1.0.0-9WY2vO9HEhB6K2BmAnACTs" '
False
) (
C1
('
MetaCons
"UnifiedMap" '
PrefixI
'
False
) (
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
(
Map
cred (
Trip
coin ptr pool)))
:*:
S1
('
MetaSel
('
Nothing
::
Maybe
Symbol
) '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
(
Map
ptr cred))))
|
|
type Share ( UMap coin cred pool ptr) | |
data Trip coin ptr pool where Source #
pattern Triple :: StrictMaybe coin -> Set ptr -> StrictMaybe pool -> Trip coin ptr pool |
Instances
class UnifiedView coin cred pool ptr k v where Source #
Instances
UnifiedView Coin ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Ptr Ptr ( Credential ' Staking crypto) Source # | |
Defined in Cardano.Ledger.UnifiedMap |
|
UnifiedView Coin ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Ptr ( Credential ' Staking crypto) Coin Source # | |
Defined in Cardano.Ledger.UnifiedMap |
|
UnifiedView Coin ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Ptr ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Source # | |
Defined in Cardano.Ledger.UnifiedMap |
Orphan instances
UnifiedView Coin ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Ptr Ptr ( Credential ' Staking crypto) Source # | |
UnifiedView Coin ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Ptr ( Credential ' Staking crypto) Coin Source # | |
UnifiedView Coin ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Ptr ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto) Source # | |