-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agda 2.6.4 migration #256
Agda 2.6.4 migration #256
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,8 @@ let | |
src = fetchFromGitHub { | ||
repo = "agda-stdlib"; | ||
owner = "input-output-hk"; | ||
rev = "bdfab77b179c937856c49d72321ca26e2a27d568"; | ||
sha256 = "+PMZjmMK5xz+3Va7RN1ErtQghzpUlzsc9JBUoL+iasc="; | ||
rev = "cb72ba52dfbd4f83d1034e352eb88550a3e1f681"; | ||
sha256 = "+OByLIWv+pdHvWt41hniE4oeo2DJZewRyYYmNXvCix0="; | ||
}; | ||
}); | ||
|
||
|
@@ -27,8 +27,8 @@ let | |
src = fetchFromGitHub { | ||
repo = "stdlib-meta"; | ||
owner = "input-output-hk"; | ||
rev = "897555aefd77c83e88492255641da3bcc4879461"; | ||
sha256 = "EIKcLjGdnI/6nSCI18v7kPxoojAWsz8O5d9wwol2M0w="; | ||
rev = "f434542c4baf667805161eeb35e5ec772233e180"; | ||
sha256 = "e+gb3z+cTFW4QS0c/SQqnNVBxf9hGHKOZa/vSMkHDvw="; | ||
Comment on lines
+30
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am hoping to release a 2.6.4-compatible stdlib-meta soon (also requested for another in-house product that uses stdlib-meta), but let's not block this now; I will simplify when the time comes. |
||
}; | ||
meta = { }; | ||
libraryFile = "stdlib-meta.agda-lib"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ instance | |
_ = ExUnit-CommutativeMonoid | ||
|
||
HasCoin-Map : ∀ {A} → ⦃ DecEq A ⦄ → HasCoin (A ⇀ Coin) | ||
HasCoin-Map .getCoin s = Σᵐᵛ[ x ← s ᶠᵐ ] x | ||
HasCoin-Map .getCoin s = indexedSumᵐᵛ ⦃ +-0-commutativeMonoid ⦄ id (s ᶠᵐ) | ||
|
||
isPhaseTwoScriptAddress : Tx → Addr → Bool | ||
isPhaseTwoScriptAddress tx a | ||
|
@@ -42,7 +42,7 @@ isPhaseTwoScriptAddress tx a | |
... | just s = isP2Script s | ||
|
||
totExUnits : Tx → ExUnits | ||
totExUnits tx = Σᵐ[ x ← tx .wits .txrdmrs ᶠᵐ ] (x .proj₂ .proj₂) | ||
totExUnits tx = indexedSumᵐ ⦃ ExUnit-CommutativeMonoid ⦄ (λ x → x .proj₂ .proj₂) (tx .wits .txrdmrs ᶠᵐ) | ||
where open Tx; open TxWitnesses | ||
|
||
-- utxoEntrySizeWithoutVal = 27 words (8 bytes) | ||
|
@@ -79,7 +79,7 @@ module _ (let open Tx; open TxBody) where | |
outs tx = mapKeys (tx .txid ,_) (tx .txouts) | ||
|
||
balance : UTxO → Value | ||
balance utxo = Σᵐᵛ[ x ← utxo ᶠᵐ ] getValue x | ||
balance utxo = indexedSumᵐᵛ ⦃ Value-CommutativeMonoid ⦄ getValue (utxo ᶠᵐ) | ||
|
||
cbalance : UTxO → Coin | ||
cbalance utxo = coin (balance utxo) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did instance resolution become less useful in Agda 2.6.4, or is there another reason for these changes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be your fault 😂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The real problem is of course that using bundled monoids as a typeclass was a bad idea from the start. I think we should switch this to an unbundled version and then I'd expect this to work again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's the very issue. I think switching to unbundled representations is the way to go. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be more proper to depend on
agda/agda-stdlib#v1.7.3
and just add the changes in the IOHK fork as.../Ext.agda
files, namely:Data/List/Relation/Unary/Unique/Propositional/Properties/WithK.agda
Tactic.MonoidSolver.Ext
which also re-exports the standardTactic.MonoidSolver
assolve-normalised
andsolve-normalised-macro
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends on the viewpoint. I'd like to get these in the actual stdlib at some point and in that case it's easier to do it like this.