-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix Eq, Show for Proposal type #115
Conversation
dc20f0a
to
7b922f9
Compare
@@ -3598,12 +3598,16 @@ convReferenceInputs txInsReference = | |||
TxInsReferenceNone -> mempty | |||
TxInsReference _ refTxins -> Set.fromList $ map toShelleyTxIn refTxins | |||
|
|||
convGovActions :: ShelleyBasedEra era -> TxGovernanceActions era -> Seq.StrictSeq (Gov.ProposalProcedure (ShelleyLedgerEra era)) | |||
convGovActions :: forall era. Ledger.EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto => ShelleyBasedEra era -> TxGovernanceActions era -> Seq.StrictSeq (Gov.ProposalProcedure (ShelleyLedgerEra era)) |
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.
We can satisfy this constraint within the function (and save the caller from having to satisfy it) via the following:
(StakeKeyHash $ obtainEraCryptoConstraints sbe pProcReturnAddr)
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 I can simplify this even further without needing list comprehension at all.
deriving instance (Shelley.EraPParams (ShelleyLedgerEra era)) => Eq (Proposal era) | ||
instance IsShelleyBasedEra era => Show (Proposal era) where | ||
show (Proposal pp) = do | ||
let ppStr = withShelleyBasedEraConstraintsForLedger (shelleyBasedEra @era) $ show pp |
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.
Good work however what we really should be doing is asking the ledger team to provide a show instance for us. Can you propagate these changes to cardano-cli to see how what the changes will look like?
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.
d3a2da5
to
27f66b9
Compare
27f66b9
to
e2fef97
Compare
…no-api-8.10.2.0 Update to `cardano-api-8.10.2.0`
Changelog
Context
Fixing Conway TODOs.
Checklist
.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7
Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.