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 a public getFilling function #8

Merged
merged 2 commits into from
Apr 13, 2021
Merged

Add a public getFilling function #8

merged 2 commits into from
Apr 13, 2021

Conversation

dpwiz
Copy link
Contributor

@dpwiz dpwiz commented Apr 11, 2021

I would like to have a structure preview capability. This is a stepping stone towards it.

> data Foo = Foo Word8 Float Word32 Float deriving (Show, Generic, GStorable)
> getFilling (Foo 0 0 0 0)
[Size 1,Padding 3,Size 4,Size 4,Size 4]

@dpwiz
Copy link
Contributor Author

dpwiz commented Apr 11, 2021

Hm... The git master appears to be older than Hackage code 🤔

@mkloczko
Copy link
Owner

Yeah, sorry, forgot to push changes ^^'.

@dpwiz
Copy link
Contributor Author

dpwiz commented Apr 13, 2021

Thanks. I've updated the PR with docs and a provisional version bump.

@mkloczko mkloczko merged commit 5f3c6d0 into mkloczko:master Apr 13, 2021
@mkloczko
Copy link
Owner

Thanks, will rename the function and the Filling data type, probably into gmemoryLayout or something like that.

@dpwiz
Copy link
Contributor Author

dpwiz commented Apr 13, 2021

Would be cool if the sizes could be annotated with field and type names 🤔
That'll make generating actual C structs almost trivial.

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