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

Export data constructor for boxed vector #245

Closed
andrewthad opened this issue May 15, 2019 · 6 comments
Closed

Export data constructor for boxed vector #245

andrewthad opened this issue May 15, 2019 · 6 comments
Milestone

Comments

@andrewthad
Copy link
Contributor

The module Data.Vector does not export the data constructor for Vector. Exporting this would make it possible to use vector's functions in contexts where I am working with an unsliced Array and want to fold over a slice of it. In general, I would like to see all of the data constructors exported.

@cartazio In #49, this is the same position you take. Do you still agree?

@chessai
Copy link
Member

chessai commented May 15, 2019 via email

@cartazio
Copy link
Contributor

cartazio commented May 15, 2019 via email

@Shimuuar
Copy link
Contributor

I think exporting constructor from Data.Vector is wrong. It's trivial to create memory unsafe vector value: Vector 0 10000 []. It's probably better to export it from some *.Internal module. It would make obvious that it is dangerous.

@andrewthad
Copy link
Contributor Author

I don't care what module it comes from. Either Data.Vector.Unsafe or Data.Vector.Internal would be fine to me.

@cartazio
Copy link
Contributor

cartazio commented May 15, 2019 via email

@lehins
Copy link
Contributor

lehins commented Jun 19, 2022

Fixed in #434 by providing functions that give access to boxed Vector's internal Array

@lehins lehins closed this as completed Jun 19, 2022
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

5 participants