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

Derive NFData instances and export VKey and VKeyGenesis patterns as data constructors #1373

Merged
merged 3 commits into from
Apr 15, 2020

Conversation

intricate
Copy link
Contributor

@intricate intricate commented Apr 15, 2020

  • The NFData instances are required for work being done as part of Add Shelley keypair generation cardano-node#799.

  • The patterns VKey and VKeyGenesis are exported as data constructors of the type DiscVKey in order to prevent modules that import these symbols from being forced to enable PatternSynonyms.

    i.e., you can do:

    import Shelley.Spec.Ledger.Keys (DiscVKey(VKey, VKeyGenesis))

    instead of:

    import Shelley.Spec.Ledger.Keys (pattern VKey, pattern VKeyGenesis)

  • The COMPLETE pragma to indicate that the set of patterns VKey and VKeyGenesis are complete, therefore preventing non-exhaustive pattern match warnings.

Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

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

LGTM

@intricate intricate force-pushed the intricate/shelley-keys-nfdata branch from 55d16e9 to f620527 Compare April 15, 2020 14:51
@intricate intricate force-pushed the intricate/shelley-keys-nfdata branch from f620527 to 40d62da Compare April 15, 2020 14:58
@intricate intricate merged commit 8b25a1c into master Apr 15, 2020
@intricate intricate deleted the intricate/shelley-keys-nfdata branch April 15, 2020 15:28
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.

None yet

3 participants