Skip to content

Commit b8f02da

Browse files
committed
Refactor deposits; add IsValidFlag typeclass; Use typeclasses for field accesors
1 parent 7e06594 commit b8f02da

File tree

6 files changed

+108
-59
lines changed

6 files changed

+108
-59
lines changed

src/Ledger/Dijkstra/Specification/Certs.lagda.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ record StakePoolParams : Type where
3131
pledge : Coin
3232
rewardAccount : Credential
3333
34-
-- Deposit Types
35-
data DepositPurpose : Type where
36-
CredentialDeposit : Credential → DepositPurpose
37-
PoolDeposit : KeyHash → DepositPurpose
38-
DRepDeposit : Credential → DepositPurpose
39-
GovActionDeposit : GovActionID → DepositPurpose
40-
41-
Deposits : Type
42-
Deposits = DepositPurpose ⇀ Coin
43-
4434
-- Miscellaneous Type Aliases
4535
4636
CCHotKeys : Type
@@ -98,21 +88,21 @@ record DState : Type where
9888
voteDelegs : VoteDelegs
9989
stakeDelegs : StakeDelegs
10090
rewards : Rewards
101-
deposits : Deposits
91+
deposits : Credential ⇀ Coin
10292
10393
record PState : Type where
10494
field
10595
pools : Pools
10696
fPools : Pools
10797
retiring : KeyHash ⇀ Epoch
108-
deposits : Deposits
98+
deposits : KeyHash ⇀ Coin
10999
110100
record GState : Type where
111101
constructor ⟦_,_⟧ᵛ
112102
field
113103
dreps : DReps
114104
ccHotKeys : Credential ⇀ Maybe Credential
115-
deposits : Deposits
105+
deposits : Credential ⇀ Coin
116106
117107
record CertState : Type where
118108
constructor ⟦_,_,_⟧ᶜˢ
@@ -130,14 +120,10 @@ record DelegEnv : Type where
130120

131121
<!--
132122
```agda
133-
record HasDeposits {a} (A : Type a) : Type a where
134-
field DepositsOf : A → Deposits
123+
record HasDeposits (A : Type) {K : Type} : Type where
124+
field DepositsOf : A → K ⇀ Coin
135125
open HasDeposits ⦃...⦄ public
136126
137-
instance
138-
unquoteDecl DecEq-DepositPurpose = derive-DecEq
139-
((quote DepositPurpose , DecEq-DepositPurpose) ∷ [])
140-
141127
record HasCCHotKeys {a} (A : Type a) : Type a where
142128
field CCHotKeysOf : A → CCHotKeys
143129
open HasCCHotKeys ⦃...⦄ public
@@ -194,9 +180,15 @@ instance
194180
HasRewards-DState : HasRewards DState
195181
HasRewards-DState .RewardsOf = DState.rewards
196182
183+
HasDeposits-DState : HasDeposits DState
184+
HasDeposits-DState .DepositsOf = DState.deposits
185+
197186
HasPools-PState : HasPools PState
198187
HasPools-PState .PoolsOf = PState.pools
199188
189+
HasDeposits-PState : HasDeposits PState
190+
HasDeposits-PState .DepositsOf = PState.deposits
191+
200192
HasRetiring-PState : HasRetiring PState
201193
HasRetiring-PState .RetiringOf = PState.retiring
202194
@@ -206,6 +198,9 @@ instance
206198
HasCCHotKeys-GState : HasCCHotKeys GState
207199
HasCCHotKeys-GState .CCHotKeysOf = GState.ccHotKeys
208200
201+
HasDeposits-GState : HasDeposits GState
202+
HasDeposits-GState .DepositsOf = GState.deposits
203+
209204
HasDState-CertState : HasDState CertState
210205
HasDState-CertState .DStateOf = CertState.dState
211206
@@ -251,7 +246,8 @@ private variable
251246
pools fPools : Pools
252247
retiring : Retiring
253248
wdrls : Withdrawals
254-
deposits deposits' : Deposits
249+
A : Type
250+
deposits deposits' : A ⇀ Coin
255251
256252
an : Anchor
257253
Γ : CertEnv
@@ -301,12 +297,12 @@ data _⊢_⇀⦇_,DELEG⦈_ : DelegEnv → DState → DCert → DState → Type
301297
fromList ( nothing ∷ just vDelegAbstain ∷ just vDelegNoConfidence ∷ [] )
302298
∙ mkh ∈ mapˢ just (dom pools) ∪ ❴ nothing ❵
303299
────────────────────────────────
304-
⟦ pp , pools , delegatees ⟧ ⊢ ⟦ vDelegs , sDelegs , rwds , deposits ⟧ ⇀⦇ delegate c mvd mkh d ,DELEG⦈ ⟦ insertIfJust c mvd vDelegs , insertIfJust c mkh sDelegs , rwds ∪ˡ ❴ c , 0 ❵ , deposits ∪⁺ ❴ CredentialDeposit c , d ❵ ⟧
300+
⟦ pp , pools , delegatees ⟧ ⊢ ⟦ vDelegs , sDelegs , rwds , deposits ⟧ ⇀⦇ delegate c mvd mkh d ,DELEG⦈ ⟦ insertIfJust c mvd vDelegs , insertIfJust c mkh sDelegs , rwds ∪ˡ ❴ c , 0 ❵ , deposits ∪⁺ ❴ c , d ❵ ⟧
305301
306302
DELEG-dereg :
307303
∙ (c , 0) ∈ rwds
308304
────────────────────────────────
309-
⟦ pp , pools , delegatees ⟧ ⊢ ⟦ vDelegs , sDelegs , rwds , deposits ⟧ ⇀⦇ dereg c md ,DELEG⦈ ⟦ vDelegs ∣ ❴ c ❵ ᶜ , sDelegs ∣ ❴ c ❵ ᶜ , rwds ∣ ❴ c ❵ ᶜ , deposits ∣ ❴ CredentialDeposit c ❵ ᶜ ⟧
305+
⟦ pp , pools , delegatees ⟧ ⊢ ⟦ vDelegs , sDelegs , rwds , deposits ⟧ ⇀⦇ dereg c md ,DELEG⦈ ⟦ vDelegs ∣ ❴ c ❵ ᶜ , sDelegs ∣ ❴ c ❵ ᶜ , rwds ∣ ❴ c ❵ ᶜ , deposits ∣ ❴ c ❵ ᶜ ⟧
310306
311307
312308
isPoolRegistered : Pools -> KeyHash -> Maybe StakePoolParams
@@ -326,7 +322,7 @@ data _⊢_⇀⦇_,POOL⦈_ : PoolEnv → PState → DCert → PState → Type wh
326322
pools ∪ˡ ❴ kh , poolParams ❵
327323
, fPools
328324
, retiring
329-
, deposits ∪⁺ ❴ PoolDeposit kh , pp .poolDeposit ❵
325+
, deposits ∪ˡ ❴ kh , pp .poolDeposit ❵
330326
331327
332328
POOL-rereg :
@@ -363,12 +359,12 @@ data _⊢_⇀⦇_,GOVCERT⦈_ : CertEnv → GState → DCert → GState → Type
363359
GOVCERT-regdrep :
364360
∙ (d ≡ pp .drepDeposit × c ∉ dom dReps) ⊎ (d ≡ 0 × c ∈ dom dReps)
365361
────────────────────────────────
366-
⟦ e , pp , vs , wdrls , cc ⟧ ⊢ ⟦ dReps , ccKeys , deposits ⟧ ⇀⦇ regdrep c d an ,GOVCERT⦈ ⟦ ❴ c , e + pp .drepActivity ❵ ∪ˡ dReps , ccKeys , deposits ∪⁺ ❴ DRepDeposit c , d ❵ ⟧
362+
⟦ e , pp , vs , wdrls , cc ⟧ ⊢ ⟦ dReps , ccKeys , deposits ⟧ ⇀⦇ regdrep c d an ,GOVCERT⦈ ⟦ ❴ c , e + pp .drepActivity ❵ ∪ˡ dReps , ccKeys , deposits ∪⁺ ❴ c , d ❵ ⟧
367363
368364
GOVCERT-deregdrep :
369365
∙ c ∈ dom dReps
370366
────────────────────────────────
371-
⟦ e , pp , vs , wdrls , cc ⟧ ⊢ ⟦ dReps , ccKeys , deposits ⟧ ⇀⦇ deregdrep c d ,GOVCERT⦈ ⟦ dReps ∣ ❴ c ❵ ᶜ , ccKeys , deposits ∣ ❴ DRepDeposit c ❵ ᶜ ⟧
367+
⟦ e , pp , vs , wdrls , cc ⟧ ⊢ ⟦ dReps , ccKeys , deposits ⟧ ⇀⦇ deregdrep c d ,GOVCERT⦈ ⟦ dReps ∣ ❴ c ❵ ᶜ , ccKeys , deposits ∣ ❴ c ❵ ᶜ ⟧
372368
373369
GOVCERT-ccreghot :
374370
∙ (c , nothing) ∉ ccKeys

src/Ledger/Dijkstra/Specification/Ledger.lagda.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,20 @@ rmOrphanDRepVotes cs govSt = L.map (map₂ go) govSt
165165
allColdCreds : GovState → EnactState → ℙ Credential
166166
allColdCreds govSt es =
167167
ccCreds (es .cc) ∪ concatMapˢ (λ (_ , st) → proposedCC (GovActionOf st)) (fromList govSt)
168+
169+
calculateDepositsChange : CertState → CertState → ℤ
170+
calculateDepositsChange certState certState' = initialCoin - finalCoin
171+
where
172+
initialCoin : ℕ
173+
initialCoin = getCoin (DepositsOf (DStateOf certState))
174+
+ getCoin (DepositsOf (PStateOf certState))
175+
+ getCoin (DepositsOf (GStateOf certState))
176+
177+
finalCoin : ℕ
178+
finalCoin = getCoin (DepositsOf (DStateOf certState'))
179+
+ getCoin (DepositsOf (PStateOf certState'))
180+
+ getCoin (DepositsOf (GStateOf certState'))
181+
168182
```
169183

170184
-- ## <span class="AgdaDatatype">LEDGER</span> Transition System
@@ -178,6 +192,7 @@ private variable
178192
utxo₀ : UTxO
179193
govState govState' : GovState
180194
certState certState' : CertState
195+
depositsChange : ℤ
181196
stx : SubLevelTx
182197
slot : Slot
183198
ppolicy : Maybe ScriptHash
@@ -246,12 +261,15 @@ data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LState → TopLevelTx → LState
246261
247262
allData : DataHash ⇀ Datum
248263
allData = setToMap (mapˢ < hash , id > (getAllData tx utxo₀))
264+
265+
depositsChange : ℤ
266+
depositsChange = calculateDepositsChange certState certState''
249267
in
250-
∙ Tx.isValid tx ≡ true
251-
∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , Tx.isValid tx , allScripts , allData ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ SubTransactionsOf tx ,SUBLEDGERS⦈ ⟦ utxoState' , govState' , certState' ⟧
252-
∙ ⟦ slot , pp , treasury , utxo₀ , Tx.isValid tx , allScripts , allData ⟧ ⊢ utxoState' ⇀⦇ tx ,UTXOW⦈ utxoState''
268+
∙ IsValidFlagOf tx ≡ true
269+
∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , IsValidFlagOf tx , allScripts , allData ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ SubTransactionsOf tx ,SUBLEDGERS⦈ ⟦ utxoState' , govState' , certState' ⟧
253270
∙ ⟦ epoch slot , pp , ListOfGovVotesOf tx , WithdrawalsOf tx , allColdCreds govState enactState ⟧ ⊢ certState' ⇀⦇ DCertsOf tx ,CERTS⦈ certState''
254271
∙ ⟦ TxIdOf tx , epoch slot , pp , ppolicy , enactState , certState' , dom (RewardsOf certState) ⟧ ⊢ rmOrphanDRepVotes certState' govState ⇀⦇ GovProposals+Votes tx ,GOVS⦈ govState'
272+
∙ ⟦ slot , pp , treasury , utxo₀ , IsValidFlagOf tx , depositsChange , allScripts , allData ⟧ ⊢ utxoState' ⇀⦇ tx ,UTXOW⦈ utxoState''
255273
────────────────────────────────
256274
⟦ slot , ppolicy , pp , enactState , treasury ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ tx ,LEDGER⦈ ⟦ utxoState'' , govState'' , certState'' ⟧
257275
@@ -264,23 +282,14 @@ data _⊢_⇀⦇_,LEDGER⦈_ : LedgerEnv → LState → TopLevelTx → LState
264282
allData : DataHash ⇀ Datum
265283
allData = setToMap (mapˢ < hash , id > (getAllData tx utxo₀))
266284
in
267-
Tx.isValid tx ≡ false
268-
∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , Tx.isValid tx , allScripts , allData ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ SubTransactionsOf tx ,SUBLEDGERS⦈ ⟦ utxoState , govState , certState ⟧
269-
∙ ⟦ slot , pp , treasury , utxo₀ , Tx.isValid tx , allScripts , allData ⟧ ⊢ utxoState ⇀⦇ tx ,UTXOW⦈ utxoState'
285+
IsValidFlagOf tx ≡ false
286+
∙ ⟦ slot , ppolicy , pp , enactState , treasury , utxo₀ , IsValidFlagOf tx , allScripts , allData ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ SubTransactionsOf tx ,SUBLEDGERS⦈ ⟦ utxoState , govState , certState ⟧
287+
∙ ⟦ slot , pp , treasury , utxo₀ , IsValidFlagOf tx , 0ℤ , allScripts , allData ⟧ ⊢ utxoState ⇀⦇ tx ,UTXOW⦈ utxoState'
270288
────────────────────────────────
271289
⟦ slot , ppolicy , pp , enactState , treasury ⟧ ⊢ ⟦ utxoState , govState , certState ⟧ ⇀⦇ tx ,LEDGER⦈ ⟦ utxoState' , govState , certState ⟧
272290
```
273291

274-
-- <!--
275-
-- ```agda
276-
-- pattern LEDGER-V⋯ w x y z = LEDGER-V (w , x , y , z)
277-
-- pattern LEDGER-I⋯ y z = LEDGER-I (y , z)
278-
-- ```
279-
-- -->
280-
281-
-- ## <span class="AgdaDatatype">LEDGERS</span> Transition System
282-
283-
-- ```agda
284-
-- __⇀⦇_,LEDGERS⦈_ : LEnv → LState → List Tx → LState → Type
285-
-- __⇀⦇_,LEDGERS⦈_ = ReflexiveTransitiveClosure {sts = __⇀⦇_,LEDGER⦈_}
286-
-- ```
292+
```agda
293+
_⊢_⇀⦇_,LEDGERS⦈_ : LedgerEnv → LState → List TopLevelTx → LState → Type
294+
_⊢_⇀⦇_,LEDGERS⦈_ = ReflexiveTransitiveClosure {sts = _⊢_⇀⦇_,LEDGER⦈_}
295+
```

src/Ledger/Dijkstra/Specification/Transaction.lagda.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,20 @@ could be either of them.
372372
field TxOutsOf : A → Ix ⇀ TxOut
373373
open HasTxOuts ⦃...⦄ public
374374
375+
record HasIsValidFlag {a} (A : Type a) : Type a where
376+
field IsValidFlagOf : A → Bool
377+
open HasIsValidFlag ⦃...⦄ public
378+
375379
instance
376380
HasTxBody-Tx : HasTxBody (Tx txLevel)
377381
HasTxBody-Tx .TxBodyOf = Tx.txBody
378382
379383
HasTxWitnesses-Tx : HasTxWitnesses (Tx txLevel)
380384
HasTxWitnesses-Tx .TxWitnessesOf = Tx.txWitnesses
381385
386+
HasIsValidFlag-Tx : HasIsValidFlag TopLevelTx
387+
HasIsValidFlag-Tx .IsValidFlagOf = Tx.isValid
388+
382389
HasRedeemers-TxWitnesses : HasRedeemers (TxWitnesses txLevel)
383390
HasRedeemers-TxWitnesses .RedeemersOf = TxWitnesses.txRedeemers
384391

src/Ledger/Dijkstra/Specification/Utxo.lagda.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ open import Ledger.Dijkstra.Specification.Script.Validation txs abs
3636

3737
```agda
3838
record UTxOEnv : Type where
39+
field
40+
slot : Slot
41+
pparams : PParams
42+
treasury : Treasury
43+
utxo₀ : UTxO
44+
isTopLevelValid : Bool
45+
depositsChange : ℤ
46+
globalScripts : ℙ P1Script × ℙ P2Script
47+
globalData : DataHash ⇀ Datum
48+
49+
record SubUTxOEnv : Type where
3950
field
4051
slot : Slot
4152
pparams : PParams
@@ -54,7 +65,6 @@ record UTxOState : Type where
5465
field
5566
utxo : UTxO
5667
fees : Fees
57-
deposits : Deposits
5868
donations : Donations
5969
```
6070

@@ -64,23 +74,48 @@ record HasUTxOState {a} (A : Type a) : Type a where
6474
field UTxOStateOf : A → UTxOState
6575
open HasUTxOState ⦃...⦄ public
6676
77+
record HasGlobalScripts {a} (A : Type a) : Type a where
78+
field GlobalScriptsOf : A → ℙ P1Script × ℙ P2Script
79+
open HasGlobalScripts ⦃...⦄ public
80+
81+
record HasGlobalData {a} (A : Type a) : Type a where
82+
field GlobalDataOf : A → DataHash ⇀ Datum
83+
open HasGlobalData ⦃...⦄ public
84+
6785
instance
6886
HasUTxO-UTxOEnv : HasUTxO UTxOEnv
6987
HasUTxO-UTxOEnv .UTxOOf = UTxOEnv.utxo₀
7088
89+
HasUTxO-SubUTxOEnv : HasUTxO SubUTxOEnv
90+
HasUTxO-SubUTxOEnv .UTxOOf = SubUTxOEnv.utxo₀
91+
92+
HasGlobalScripts-UTxOEnv : HasGlobalScripts UTxOEnv
93+
HasGlobalScripts-UTxOEnv .GlobalScriptsOf = UTxOEnv.globalScripts
94+
95+
HasGlobalScripts-SubUTxOEnv : HasGlobalScripts SubUTxOEnv
96+
HasGlobalScripts-SubUTxOEnv .GlobalScriptsOf = SubUTxOEnv.globalScripts
97+
98+
HasGlobalData-UTxOEnv : HasGlobalData UTxOEnv
99+
HasGlobalData-UTxOEnv .GlobalDataOf = UTxOEnv.globalData
100+
101+
HasGlobalData-SubUTxOEnv : HasGlobalData SubUTxOEnv
102+
HasGlobalData-SubUTxOEnv .GlobalDataOf = SubUTxOEnv.globalData
103+
71104
HasUTxO-UTxOState : HasUTxO UTxOState
72105
HasUTxO-UTxOState .UTxOOf = UTxOState.utxo
73106
74-
unquoteDecl HasCast-UTxOEnv HasCast-UTxOState = derive-HasCast
75-
( (quote UTxOEnv , HasCast-UTxOEnv ) ∷
76-
[ (quote UTxOState , HasCast-UTxOState) ])
107+
unquoteDecl HasCast-UTxOEnv HasCast-SubUTxOEnv HasCast-UTxOState = derive-HasCast
108+
( (quote UTxOEnv , HasCast-UTxOEnv ) ∷
109+
(quote SubUTxOEnv , HasCast-SubUTxOEnv ) ∷
110+
[ (quote UTxOState , HasCast-UTxOState) ])
77111
```
78112
-->
79113

80114
<!--
81115
```agda
82116
private variable
83-
Γ : UTxOEnv
117+
A : Type
118+
Γ : A
84119
s s' : UTxOState
85120
tx : TopLevelTx
86121
stx : SubLevelTx
@@ -120,7 +155,7 @@ This is achieved by the following precondition in the `UTXO`.{AgdaDatatype} and
120155
transaction (or partially applying any part of it).
121156

122157
```agda
123-
data _⊢_⇀⦇_,SUBUTXO⦈_ : UTxOEnv → UTxOState → SubLevelTx → UTxOState → Type where
158+
data _⊢_⇀⦇_,SUBUTXO⦈_ : SubUTxOEnv → UTxOState → SubLevelTx → UTxOState → Type where
124159
125160
SUBUTXO :
126161

src/Ledger/Dijkstra/Specification/Utxow.lagda.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ open import Ledger.Dijkstra.Specification.Script.Validation txs abs
2323
2424
private variable
2525
ℓ : TxLevel
26-
Γ : UTxOEnv
26+
A : Type
27+
Γ : A
2728
s s' : UTxOState
2829
tx : TopLevelTx
2930
stx : SubLevelTx
@@ -39,7 +40,7 @@ allowedLanguages tx utxo = ∅ -- TODO
3940
```
4041

4142
```agda
42-
data _⊢_⇀⦇_,SUBUTXOW⦈_ : UTxOEnv → UTxOState → SubLevelTx → UTxOState → Type where
43+
data _⊢_⇀⦇_,SUBUTXOW⦈_ : SubUTxOEnv → UTxOState → SubLevelTx → UTxOState → Type where
4344
4445
SUBUTXOW :
4546
let
@@ -48,17 +49,17 @@ data _⊢_⇀⦇_,SUBUTXOW⦈_ : UTxOEnv → UTxOState → SubLevelTx → UTxOSt
4849
open TxWitnesses txWitnesses
4950
open UTxOEnv
5051
51-
utxo₀ = Γ .utxo₀
52-
utxo = s .UTxOState.utxo
52+
utxo₀ = UTxOOf Γ
53+
utxo = UTxOOf s
5354
5455
witsKeyHashes : ℙ KeyHash
5556
witsKeyHashes = mapˢ hash (dom vKeySigs)
5657
5758
p1Scripts : ℙ P1Script
58-
p1Scripts = proj₁ (Γ .globalScripts)
59+
p1Scripts = proj₁ (GlobalScriptsOf Γ)
5960
6061
p2Scripts : ℙ P2Script
61-
p2Scripts = proj₂ (Γ .globalScripts)
62+
p2Scripts = proj₂ (GlobalScriptsOf Γ)
6263
6364
neededScriptHashes : ℙ ScriptHash
6465
neededScriptHashes = mapPartial (isScriptObj ∘ proj₂) (credsNeeded utxo₀ txBody)
@@ -77,12 +78,12 @@ data _⊢_⇀⦇_,SUBUTXOW⦈_ : UTxOEnv → UTxOState → SubLevelTx → UTxOSt
7778
∙ ∀[ s ∈ p1Scripts ] (hash s ∈ neededScriptHashes → validP1Script witsKeyHashes txVldt s)
7879
∙ neededVKeyHashes ⊆ witsKeyHashes
7980
∙ neededScriptHashes ⊆ mapˢ hash p1Scripts ∪ mapˢ hash p2Scripts
80-
∙ neededDataHashes ⊆ dom (Γ .globalData)
81+
∙ neededDataHashes ⊆ dom (GlobalDataOf Γ)
8182
∙ languages tx utxo ⊆ allowedLanguages tx utxo
8283
∙ txADhash ≡ map hash txAuxData
83-
∙ Γ ⊢ s ⇀⦇ stx ,SUBUTXO⦈ s'
84+
Γ ⊢ s ⇀⦇ stx ,SUBUTXO⦈ s'
8485
────────────────────────────────
85-
Γ ⊢ s ⇀⦇ stx ,SUBUTXOW⦈ s'
86+
Γ ⊢ s ⇀⦇ stx ,SUBUTXOW⦈ s'
8687
8788
data _⊢_⇀⦇_,UTXOW⦈_ : UTxOEnv → UTxOState → TopLevelTx → UTxOState → Type where
8889

src/Ledger/Prelude.lagda.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ open import abstract-set-theory.FiniteSetTheory public
4646
renaming (_⊆_ to _⊆ˢ_)
4747
4848
import Data.Integer as ℤ
49+
open import Data.Integer using (0ℤ) public
4950
import Data.Rational as ℚ
5051
open import Data.Rational using (ℚ)
5152

0 commit comments

Comments
 (0)