Skip to content

Commit 44950ed

Browse files
committed
Remove Ledger.Set, inline the main def in Ledger.Prelude
1 parent 2b85eba commit 44950ed

File tree

4 files changed

+6
-22
lines changed

4 files changed

+6
-22
lines changed

src/Ledger/Prelude.agda

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ open import Ledger.Interface.HasCoin public
2929
open import MyDebugOptions public
3030
open import Tactic.Premises public
3131

32-
open import Ledger.Set public
33-
renaming (_⊆_ to _⊆ˢ_)
32+
open import abstract-set-theory.FiniteSetTheory public
33+
renaming (_⊆_ to _⊆ˢ_)
3434

3535
dec-de-morgan : {P Q : Type} ⦃ P ⁇ ⦄ ¬ (P × Q) ¬ P ⊎ ¬ Q
3636
dec-de-morgan ⦃ ⁇ no ¬p ⦄ ¬pq = inj₁ ¬p
@@ -50,3 +50,6 @@ instance
5050

5151
≡ᵉ-getCoin : {A} ⦃ _ : DecEq A ⦄ (s s' : A ⇀ Coin) s ˢ ≡ᵉ s' ˢ getCoin s ≡ getCoin s'
5252
≡ᵉ-getCoin {A} ⦃ decEqA ⦄ s s' s≡s' = indexedSumᵛ'-cong {C = Coin} {x = s} {y = s'} s≡s'
53+
54+
setToMap : {A B : Type} ⦃ DecEq A ⦄ ℙ (A × B) A ⇀ B
55+
setToMap = fromListᵐ ∘ setToList

src/Ledger/Set.agda

-6
This file was deleted.

src/Ledger/Set/HashMap.agda

-13
This file was deleted.

src/Ledger/Transaction.lagda

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ record TransactionStructure : Type₁ where
222222
just (lookupᵐ m sh)
223223
else
224224
nothing
225-
where m = setToHashMap (txscripts tx utxo)
225+
where m = setToMap (mapˢ < hash , id > (txscripts tx utxo))
226226
\end{code}
227227
\end{AgdaMultiCode}
228228
\caption{Functions related to transactions}

0 commit comments

Comments
 (0)