-
Notifications
You must be signed in to change notification settings - Fork 141
Add map for mutable vector which modify it in place. #545
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice. inPlace
is a fine suffix IMHO
06943b5
to
0d3a6fd
Compare
Co-authored-by: Alexey Kuleshevich <lehins@yandex.ru>
9184bca
to
367a037
Compare
I've added tests and specializations. PR is done I also disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Thank you for your work!
vector/vector.cabal
Outdated
-- Disable pointless warning about partial functions | ||
if impl(ghc >= 9.8) | ||
Ghc-Options: -Wno-x-partial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest moving this to the test suite, where this is actually relevant, instead of also applying it to the library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I consider this warning somewhat misguide so I'm fine with disabling it globally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am actually very happy that this warning exists. IMHO, there is never a case when head
or tail
should be used outside of testing and throw away code
367a037
to
b2e00f2
Compare
This is last part of API for mutable vectors
Naming was discussed at length in #334. I somewhat arbitrarily picked variant with
InPlace
suffix. But I don't feel strongly about it and this is good moment for final decision. Bikeshedding season is onFixes #334