Skip to content

Conversation

Shimuuar
Copy link
Contributor

@Shimuuar Shimuuar commented Sep 9, 2025

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 on

Fixes #334

Copy link
Contributor

@lehins lehins left a 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

@Shimuuar Shimuuar marked this pull request as ready for review September 13, 2025 19:19
@Shimuuar
Copy link
Contributor Author

I've added tests and specializations. PR is done

I also disabled -Wx-partial. There's no point in warnings about head & tail. We do need them in test suite.

Copy link
Contributor

@lehins lehins left a 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!

Comment on lines 103 to 105
-- Disable pointless warning about partial functions
if impl(ghc >= 9.8)
Ghc-Options: -Wno-x-partial
Copy link
Contributor

@lehins lehins Sep 14, 2025

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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

@Shimuuar Shimuuar merged commit 7b39212 into haskell:master Sep 14, 2025
28 checks passed
@Shimuuar Shimuuar deleted the mutable_mapM branch September 14, 2025 11:54
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

Successfully merging this pull request may close these issues.

Enrich mutable API for vectors
2 participants