Skip to content

Fixup naming in cardano-crypto-leios#675

Merged
lehins merged 6 commits into
masterfrom
lehins/fixup-leios-naming
Jun 29, 2026
Merged

Fixup naming in cardano-crypto-leios#675
lehins merged 6 commits into
masterfrom
lehins/fixup-leios-naming

Conversation

@lehins

@lehins lehins commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Description

Some of the feedback in #670 was not fully addressed. This PR fixes that.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
    New section is never added with the code changes. (See RELEASING.md)
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated.
    If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • Self-reviewed the diff

lehins added 3 commits June 29, 2026 10:17
* usage of `committeeVoters` was inconsistent with type name
  `LeiosCommittee` and `leios CommitteeSize, hence it was renamed to
  `leiosCommitteeVoters`
* Using `newtype` deriving will always produce more efficient code than
  using `Generics` for instance deriving, hence switch from `anyclass`
  to `newtype` derriving strategy
Having exported bindings with names like `signers` in a huge project
crypto project like Cardano is guaranteed to cause name clashes and
potential confusion. Also prefixes are used throughtout the whole
project, which makes consistency is another reason for the rename.

CDDL snippet was removed from the Haddock, since we have a proper place
for CDDL specification. Moreover, including code in Haddock pretty much
guarantees that it will become outdated sooner or later, unless it is
tested with doctest.
Comment thread cardano-crypto-leios/src/Cardano/Crypto/Leios.hs Outdated

@ch1bo ch1bo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Prefixing all field names is not my personal favorite, and I'd argue there is not really a precedent in this repository (e.g. Cardano.Crypto.VRF.Praos has many non-Praos named generic types and functions exported), but I can live with it 🤷

@lehins lehins enabled auto-merge June 29, 2026 09:04
ch1bo added 2 commits June 29, 2026 11:06
We need this version because of byteArrayFromByteString
@lehins lehins merged commit 60827ef into master Jun 29, 2026
27 checks passed
@lehins lehins deleted the lehins/fixup-leios-naming branch June 29, 2026 10:30
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.

2 participants