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

Enumerate common patterns for hand-written high-level bindings #27

Open
3 tasks
edsko opened this issue Aug 1, 2024 · 0 comments
Open
3 tasks

Enumerate common patterns for hand-written high-level bindings #27

edsko opened this issue Aug 1, 2024 · 0 comments

Comments

@edsko
Copy link
Collaborator

edsko commented Aug 1, 2024

Probably this list will grow over time, but will be useful to have a basic starting set. Sources of inspiration:

  • Some of the c2hs patterns could potentially be implemented as regular Haskell abstractions (to be used with the generated low-level bindings), such as default marshallers (monadic/scoped such as withCString, or pure), mapping a single Haskell argument to multiple C arguments (e.g. withCStringLen), etc.
  • The patterns describes in https://well-typed.com/blog/2023/03/purgatory/ to deal with Rust-through-C.
  • greencard (tracking this at Look at greencard #62)

These abstractions could take the form of regular functions, or perhaps clever type classes (to deal with a variable number of arguments), etc.

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

No branches or pull requests

1 participant