Skip to content

Cleanup and document readdir options#3134

Merged
harendra-kumar merged 3 commits intomasterfrom
readdir-changes
Aug 23, 2025
Merged

Cleanup and document readdir options#3134
harendra-kumar merged 3 commits intomasterfrom
readdir-changes

Conversation

@harendra-kumar
Copy link
Copy Markdown
Member

  • Keep Posix and Windows code same.
  • remove options argument from read/reader APIs
  • rename and document options

--
-- /Pre-release/
{-# INLINE read #-}
read :: (MonadIO m, MonadCatch m) => (ReadOptions -> ReadOptions) ->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove readoptions here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not used, then why pass it. There is no reason for this operation to have an option.

:: MonadIO m
=> (ReadOptions -> ReadOptions) -> Unfold m (PosixPath, DirStream) Path
streamReader confMod = fmap (either id id) (streamEitherReader confMod)
streamReader :: MonadIO m => Unfold m (PosixPath, DirStream) Path
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning of where to keep readoptions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where it is needed.

@harendra-kumar harendra-kumar merged commit 06b8c5b into master Aug 23, 2025
19 of 22 checks passed
@harendra-kumar harendra-kumar deleted the readdir-changes branch August 23, 2025 22:05
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.

2 participants