Skip to content

Conversation

@Bodigrim
Copy link
Contributor

@Bodigrim Bodigrim commented Nov 1, 2025

This reverts commit 1962387 (introduced in #254)

I should have run benchmarks when working on the original commit: now hasTrailingPathSeparator regressed a lot, because getTrailingPathSeparator does not fuse well and we are left with a lot of overhead. And if we revert hasTrailingPathSeparator back and plug -Wno-x-partial to accomodate future warnings on Data.List.{init,last}, then there is no raison d'etre for other changes, because we will have -Wno-x-partial anyway.

In general this performance issue could be worked out / worked around, but we have a very limited toolbox because of keeping both FilePath and OsPath implementations in the same place.

So for now let's revert (and add {-# OPTIONS_GHC -Wno-x-partial #-} once Data.List.{init,last} gain warnings).

Additional context: haskell/core-libraries-committee#292

This reverts commit 1962387.

I should have run benchmarks when working on the original commit:
now `hasTrailingPathSeparator` regressed a lot, because
`getTrailingPathSeparator` does not fuse well and we are left
with a lot of overhead. And if we revert `hasTrailingPathSeparator` back
and plug `-Wno-x-partial` to accomodate future warnings on `Data.List.{init,last}`,
then there is no raison d'etre for other changes, because
we will have `-Wno-x-partial` anyway.

In general this performance issue could be worked out / worked around,
but we have a very limited toolbox because of keeping both `FilePath`
and `OsPath` implementations in the same place.

So for now let's revert (and add {-# OPTIONS_GHC -Wno-x-partial #-}
once `Data.List.{init,last}` gain warnings).

Additional context: haskell/core-libraries-committee#292
@hasufell hasufell merged commit 0136cfa into master Nov 2, 2025
2 of 28 checks passed
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.

3 participants