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

Macros: type declarations #188

Open
edsko opened this issue Sep 21, 2024 · 3 comments
Open

Macros: type declarations #188

edsko opened this issue Sep 21, 2024 · 3 comments
Assignees
Labels

Comments

@edsko
Copy link
Collaborator

edsko commented Sep 21, 2024

It is important that we deal with macros that declares types, because we should (at least have the option to) reflect these types in the Haskell bindings. For example, given

#define	__S16_TYPE		short int

we should not replace __S16_TYPE with short int in the generated bindings, ideally.

This is also important in the generation of the prelude (this particular example comes from /usr/include/x86_64-linux-gnu/bits/types.h).

@edsko edsko added this to the 1: `Storable` instances milestone Sep 21, 2024
@edsko edsko self-assigned this Sep 21, 2024
@edsko
Copy link
Collaborator Author

edsko commented Sep 21, 2024

Self-assigning this right now because I am working on the parser for macros. Am not intending to also deal with binding generation just yet.

@edsko edsko added the macros label Sep 21, 2024
@phadej
Copy link
Collaborator

phadej commented Sep 21, 2024

A problem is what does libclang say about

typedef __S16_TYPE somethingElse;

do we still see __S16_TYPE there. I doubt?

@edsko
Copy link
Collaborator Author

edsko commented Sep 21, 2024

Perhaps not directly, but if not, we can probably recover the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants