Skip to content

Order of definitions in the generated CDDL #60

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

Open
lehins opened this issue Mar 28, 2025 · 2 comments
Open

Order of definitions in the generated CDDL #60

lehins opened this issue Mar 28, 2025 · 2 comments

Comments

@lehins
Copy link
Member

lehins commented Mar 28, 2025

Currently definitions are produced in a sort arbitrary (or sorted) order.

There seems to be a potential approach already implemented in

spec = huddleDef $ mdo

We need to evaluate and see if this is the most ergonomic way to deal with this problem of defining custom order for definitions.

If there is no better alternative way, then we can close this ticket and start switching to this approach in ledger

@nc6
Copy link
Collaborator

nc6 commented Mar 31, 2025

Yeah, the monad approach is kind of nice, but the generics story is a bit crap, which is why I haven't pushed to using it more widely. See #50 for an attempt to make it better, but that has its own downsides.

@nc6
Copy link
Collaborator

nc6 commented Mar 31, 2025

See also #35

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

No branches or pull requests

2 participants