Skip to content

Conversation

@aniketd
Copy link
Contributor

@aniketd aniketd commented Nov 14, 2025

Description

New libraries named cddl for Shelley and Allegra to implement type-class-based cuddle definitions to generate .cddl files from.

Follow-up PRs should implement for eras Mary-onwards.

This is the second phase in our efforts to address #5194

NOTE

codegen on CI is expected to FAIL, and its diff is important to know exactly what has changed in the new implementation.

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@aniketd aniketd requested a review from a team as a code owner November 14, 2025 11:43
@aniketd aniketd force-pushed the aniketd/cddl-type-classes branch 5 times, most recently from 8f8415d to d435466 Compare November 17, 2025 15:18
@aniketd aniketd requested a review from lehins November 17, 2025 15:22
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

I think this looks beautiful!

If you are able to apply all of my suggestions, then feel free to start basing definitions of other eras on this PR.

I'll take a look at it again first thing in the morning and if it's all good, I'll make sure it is merged right away.

@aniketd aniketd force-pushed the aniketd/cddl-type-classes branch from d435466 to 60ee4d8 Compare November 19, 2025 12:06
@aniketd aniketd requested review from Soupstraw and lehins November 19, 2025 12:13
* Add new sub-libraries named `cddl`.
* 3 typeclasses: HuddleRule, HuddleGroup and HuddleGRule
* Proxy parameters are used to specify the era.
* Polymorphic smart-constructors for all reusable huddle-specs

Co-Authored-By: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
@lehins lehins force-pushed the aniketd/cddl-type-classes branch from 60ee4d8 to bf2d5f7 Compare November 19, 2025 23:42
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Looks great!

@aniketd Thank you for coming up with this approach!

@lehins lehins enabled auto-merge November 20, 2025 05:41
@lehins lehins merged commit 0ccc8b4 into master Nov 20, 2025
232 of 238 checks passed
@lehins lehins deleted the aniketd/cddl-type-classes branch November 20, 2025 05:50
@lehins lehins mentioned this pull request Nov 25, 2025
10 tasks
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.

4 participants