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

Add HasFlexibleArrayMember instance generation #357

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Add HasFlexibleArrayMember instance generation #357

merged 2 commits into from
Jan 9, 2025

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Jan 9, 2025

AFAICT, everything else can be built as part of -runtime library on top, i.e. hs-bindgen generation part for flams is done.

@phadej phadej requested a review from edsko January 9, 2025 07:42
@edsko
Copy link
Collaborator

edsko commented Jan 9, 2025

@phadej We need a new class other than Storable no? And generate instances for that..? Or is that already done and I missed it?

@edsko
Copy link
Collaborator

edsko commented Jan 9, 2025

Oh, no, wait, I get it. The "core" (without the flam) is Storable. The extended thing (newtype wrapped) is not, but as you said, we can do that in the lib. Ok, good.

@edsko
Copy link
Collaborator

edsko commented Jan 9, 2025

@phadej Shall I rebase or do you prefer to do it?

@phadej
Copy link
Collaborator Author

phadej commented Jan 9, 2025

We need a new class other than Storable no?

I don't think so. The support code for marshalling the whole struct (with flam) can be done without any additional generated code. HasFlexibleArrayMember and HasFlexibleArrayLength instances is enough; but are out of scope of this PR, which is about generation of HasFlexibleArrayMember.

@edsko edsko merged commit d24f676 into main Jan 9, 2025
10 checks passed
@edsko edsko deleted the flam-b branch January 9, 2025 08:27
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