-
Notifications
You must be signed in to change notification settings - Fork 32
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
Template haskell for generating Haskell records from C structs #289
Comments
What is its intended use in |
Exactly
To get rid of uses of derive-storable like https://github.com/expipiplus1/vulkan/blob/master/examples/rays/Scene.hs#L101-L105 Don't think that that package works with ghc9, and other derive-storable solutions aren't always appropriate (fpco/th-utilities#12) |
Ouch (the sound of a person suddenly discovered themselves in a middle of a minefield). Have you seen the Block class? |
regrettably I'm all too familiar :) |
I'm testing that Block class and benchmarks show that it is okay to use it for flat structures like that Sphere. The problems start when the stuff has nested structures. Also, I've grafted Packed variant to it and the performance stays lit for a few levels of nesting too. |
There's heaps of functionality in the generators regarding turning
into
Wouldn't it be great to have a quasiquoter taking the former and outputting the latter, along with appropriate
Storable
orToCStruct
instances?The text was updated successfully, but these errors were encountered: