Skip to content
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

Proper Compactible instance for Value #1996

Merged
merged 1 commit into from
Nov 19, 2020
Merged

Proper Compactible instance for Value #1996

merged 1 commit into from
Nov 19, 2020

Conversation

JaredCorduan
Copy link
Contributor

Resolves: CAD-2158


data CVPart era
= CVPart
(PolicyID era)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe unrelated to this PR, but does PolicyID really need to be parameterised over the era? The crypto should be enough, right?

newtype PolicyID era = PolicyID {policyID :: ScriptHash era}

newtype ScriptHash era
  = ScriptHash (Hash.Hash (ADDRHASH (Crypto era)) (Core.Script era))

You could apply the EraIndependentTxBody trick here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, crypto should be enough, I do think the EraIndependentTxBody trick would make this better. (I'd probably do this in a separate PR)


data CVPart era
= CVPart
(PolicyID era)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing bang?

@JaredCorduan JaredCorduan merged commit 2047733 into master Nov 19, 2020
@iohk-bors iohk-bors bot deleted the jc/cad-2158 branch November 19, 2020 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants