-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f5fb02
commit e4b187e
Showing
9 changed files
with
214 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{-# OPTIONS --safe #-} | ||
|
||
module Ledger.Set where | ||
|
||
open import Ledger.Set.Theory public | ||
open import Ledger.Set.HashMap public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{-# OPTIONS --safe #-} | ||
|
||
module Ledger.Set.HashMap where | ||
|
||
open import Prelude | ||
open import Data.Product.Ext | ||
open import Interface.Hashable | ||
open import Ledger.Set.Theory | ||
|
||
module _ {A B : Set} ⦃ _ : Hashable A B ⦄ (X : ℙ A) where | ||
|
||
setToHashRel : ℙ (B × A) | ||
setToHashRel = mapˡ hash (map ×-dup X) | ||
|
||
setToHashMap : B ⇀ A | ||
setToHashMap = setToHashRel ᵐ | ||
where instance _ = record { isLeftUnique = mapˡ∘map⦅×-dup⦆-uniq hashInj } |
Oops, something went wrong.