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

Support fixed-sized arrays in low-level bindings #36

Closed
edsko opened this issue Aug 2, 2024 · 2 comments
Closed

Support fixed-sized arrays in low-level bindings #36

edsko opened this issue Aug 2, 2024 · 2 comments
Labels
confirmed-use-case Features for which there are client-confirmed use cases

Comments

@edsko
Copy link
Collaborator

edsko commented Aug 2, 2024

We should implement an (optional) mechanism for encoding the size of a statically sized array in the Haskell type, perhaps Data.Vector.Storable.Sized or a bespoke

newtype ArrayPtr (n :: Nat) a = ArrayPtr (Ptr a)

Tracking support for multidimensional arrays as a separate ticket at #59.

@edsko edsko added this to the 1: `Storable` instances milestone Aug 2, 2024
@edsko edsko added the confirmed-use-case Features for which there are client-confirmed use cases label Aug 3, 2024
@phadej
Copy link
Collaborator

phadej commented Sep 1, 2024

Note that in structs fixed sized arrays are "spliced in", they are not pointers.

@edsko
Copy link
Collaborator Author

edsko commented Dec 20, 2024

This is implemented (ConstantArray).

@edsko edsko closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-use-case Features for which there are client-confirmed use cases
Projects
None yet
Development

No branches or pull requests

2 participants