@@ -18,7 +18,7 @@ module Ouroboros.Consensus.Ledger.Tables.MapKind
1818 , NoThunksMK
1919 , ShowMK
2020 , ZeroableMK (.. )
21- , bimapLedgerTables
21+ -- , bimapLedgerTables
2222
2323 -- * Concrete MapKinds
2424 , CodecMK (.. )
@@ -35,6 +35,8 @@ import qualified Codec.CBOR.Encoding as CBOR
3535import Data.Kind (Constraint )
3636import Data.Map.Strict (Map )
3737import qualified Data.Map.Strict as Map
38+ import Data.Proxy
39+ import Data.SOP.Strict
3840import Data.Set (Set )
3941import qualified Data.Set as Set
4042import GHC.Generics (Generic )
@@ -78,26 +80,35 @@ class
7880 (forall k v . (NoThunks k , NoThunks v ) => NoThunks (mk k v )) =>
7981 NoThunksMK mk
8082
81- -- | Map both keys and values in ledger tables.
82- --
83- -- For keys, it has the same caveats as 'Data.Map.Strict.mapKeys' or
84- -- `Data.Set.map', namely that only injective functions are suitable to be used
85- -- here.
86- bimapLedgerTables ::
87- forall x y mk .
88- ( CanMapKeysMK mk
89- , CanMapMK mk
90- , Ord (TxIn y )
91- ) =>
92- (TxIn x -> TxIn y ) ->
93- (TxOut x -> TxOut y ) ->
94- LedgerTables x mk ->
95- LedgerTables y mk
96- bimapLedgerTables f g =
97- LedgerTables
98- . mapKeysMK f
99- . mapMK g
100- . getLedgerTables
83+ -- -- | Map both keys and values in ledger tables.
84+ -- --
85+ -- -- For keys, it has the same caveats as 'Data.Map.Strict.mapKeys' or
86+ -- -- `Data.Set.map', namely that only injective functions are suitable to be used
87+ -- -- here.
88+ -- bimapLedgerTables ::
89+ -- forall tag x y mk.
90+ -- ( CanMapKeysMK mk
91+ -- , CanMapMK mk
92+ -- , Ord (TxIn y)
93+ -- ) =>
94+ -- (TxIn x -> TxIn y) ->
95+ -- (TxOut x -> TxOut y) ->
96+ -- (Credential x -> Credential y) ->
97+ -- (AccountState x -> AccountState y) ->
98+ -- LedgerTables x mk ->
99+ -- LedgerTables y mk
100+ -- bimapLedgerTables f g h i t =
101+
102+ -- `onUTxOTable` ( Table
103+ -- . mapKeysMK f
104+ -- . mapMK g
105+ -- . getTable
106+ -- )
107+ -- `onAccountsTable` ( Table
108+ -- . mapKeysMK f
109+ -- . mapMK g
110+ -- . getTable
111+ -- )
101112
102113{- ------------------------------------------------------------------------------
103114 EmptyMK
0 commit comments