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

Collect rules in definition order for export to CDDL #35

Open
nc6 opened this issue Jul 30, 2024 · 2 comments
Open

Collect rules in definition order for export to CDDL #35

nc6 opened this issue Jul 30, 2024 · 2 comments
Labels
Huddle Issues relating to the Huddle language

Comments

@nc6
Copy link
Collaborator

nc6 commented Jul 30, 2024

As with all languages, we may sometimes want to group related definitions together when doing helps to understand the semantics of what's being written. At the moment, collecting CDDL definitions from a file has no knowledge of the definition order, since this is opaque to Haskell at the surface level.

Perhaps some TH stuff would work.

@nc6 nc6 added the Huddle Issues relating to the Huddle language label Jul 30, 2024
@nc6
Copy link
Collaborator Author

nc6 commented Nov 8, 2024

An alternative would be to support grouping of entities by some metadata

@nc6
Copy link
Collaborator Author

nc6 commented Nov 8, 2024

Or a declaration monad?

nc6 added a commit that referenced this issue Nov 13, 2024
This is an attempt at addressing #35.

We provide a monad for specifying Huddle definitions, which will collect
them in definition order. This allows a fairly convenient way to put
together a specification, at the cost of it being trickier to re-use
definitions elsewhere, since they need to be returned from the monad.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Huddle Issues relating to the Huddle language
Projects
None yet
Development

No branches or pull requests

1 participant