Repository navigation
Export data constructor for boxed vector #245
Copy link
Copy link
Closed
Milestone
Description
Activity
- I have also wanted this on numerous occasions.…On Wed, May 15, 2019, 9:39 AM Andrew Martin ***@***.***> wrote: 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 <https://github.com/cartazio> In #49 <#49>, this is the same position you take. Do you still agree? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#245?email_source=notifications&email_token=AEOIX22QSZYWLDZUL4CDIUDPVQHCRA5CNFSM4HNDNJBKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GT5WI2Q>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AEOIX2YX2DOUD74WNZTFHSLPVQHCRANCNFSM4HNDNJBA> .
- Ill reread everything and then think about it. Don’t have vector loaded into my head atm. But speculative yes to making the constructor public at least in an internal module…On Wed, May 15, 2019 at 11:00 AM chessai ***@***.***> wrote: I have also wanted this on numerous occasions. On Wed, May 15, 2019, 9:39 AM Andrew Martin ***@***.***> wrote: > 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 <https://github.com/cartazio> In #49 > <#49>, this is the same position > you take. Do you still agree? > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > < #245?email_source=notifications&email_token=AEOIX22QSZYWLDZUL4CDIUDPVQHCRA5CNFSM4HNDNJBKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GT5WI2Q >, > or mute the thread > < https://github.com/notifications/unsubscribe-auth/AEOIX2YX2DOUD74WNZTFHSLPVQHCRANCNFSM4HNDNJBA > > . > — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#245?email_source=notifications&email_token=AAABBQQWADAX2SCMN7WAV7LPVQQQNA5CNFSM4HNDNJBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVO6GRA#issuecomment-492692292>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAABBQS5VG2ESBXBAQ652QDPVQQQNANCNFSM4HNDNJBA> .
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*.Internalmodule. It would make obvious that it is dangerous.I don't care what module it comes from. Either
Data.Vector.UnsafeorData.Vector.Internalwould be fine to me.- Yeah. We’re all on the same page.…On Wed, May 15, 2019 at 2:13 PM Andrew Martin ***@***.***> wrote: I don't care what module it comes from. Either Data.Vector.Unsafe or Data.Vector.Internal would be fine to me. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#245?email_source=notifications&email_token=AAABBQWUCTJGGYV5EJFM3N3PVRHDNA5CNFSM4HNDNJBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVPP23I#issuecomment-492764525>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAABBQUQ2E5KICXSDMRGSKDPVRHDNANCNFSM4HNDNJBA> .
- added 2 commits that reference this issue
on May 22, 2022 Fixed in #434 by providing functions that give access to boxed Vector's internal
Array
Metadata
Metadata
Assignees
Labels
No labels
The module
Data.Vectordoes not export the data constructor forVector. Exporting this would make it possible to usevector's functions in contexts where I am working with an unslicedArrayand 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?