Make some Posix/Windows specific APIs portable in Path#3090
Merged
harendra-kumar merged 3 commits intomasterfrom Jul 11, 2025
Merged
Make some Posix/Windows specific APIs portable in Path#3090harendra-kumar merged 3 commits intomasterfrom
harendra-kumar merged 3 commits intomasterfrom
Conversation
50d6beb to
16d3722
Compare
16d3722 to
d28fd20
Compare
adithyaov
reviewed
Jul 10, 2025
| -- paths (e.g. Apple HFS), it may cause surprising results as the path used by | ||
| -- the user may not have the same bytes as later returned by the file system. | ||
| newtype OS_PATH = OS_PATH (Array WORD_TYPE) | ||
| newtype OS_PATH = OS_PATH (Array OS_WORD_TYPE) |
Member
There was a problem hiding this comment.
Do we define a newtype in the Path module? The portable module should not have this right?
Member
There was a problem hiding this comment.
Oh nvm. This is under else branch.
adithyaov
reviewed
Jul 10, 2025
| -- | ||
| {-# INLINE dropTrailingSeparators #-} | ||
| dropTrailingSeparators :: OS_PATH -> OS_PATH | ||
| dropTrailingSeparators :: OS_PATH_TYPE -> OS_PATH_TYPE |
Member
There was a problem hiding this comment.
The portable module could have used the definition directly, but it may not be possible to implement that in an easy/clean way.
dropTrailingSeparators :: OS_PATH_TYPE -> OS_PATH_TYPE
dropTrailingSeparators = Streamly.Internal.FileSystem.OS_PATH.dropTrailingSeparators
adithyaov
approved these changes
Jul 10, 2025
Member
adithyaov
left a comment
There was a problem hiding this comment.
LGTM. Don't think there is a better way to do this.
d28fd20 to
1be8b88
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.