Skip to content

Conversation

@amesgen
Copy link
Member

@amesgen amesgen commented Jul 19, 2025

The first commit closes #197 as per #197 (comment)

The second commit fixes laziness in another implementation of tryReadTBQueueDefault in io-classes. I think this particular tryReadTBQueueDefault isn't actually used anywhere though (unless someone implements MonadSTM manually for a new monad), but still seems easy enough to fix.

@amesgen amesgen force-pushed the amesgen/tryReadTBQueueDefault branch from 40f3996 to 3a2d2e1 Compare July 19, 2025 11:34
@coot coot requested a review from Copilot August 6, 2025 16:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR makes minor improvements to the tryReadTBQueueDefault function implementations across the codebase. The changes address performance optimization and remove misleading documentation.

  • Removes a misleading comment about laziness in the io-sim implementation
  • Optimizes the io-classes implementation to avoid unnecessary reverse operations when the queue is empty
  • Updates changelog entries to document these improvements

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
io-sim/src/Control/Monad/IOSim/STM.hs Removes misleading comment about lazy pattern matching
io-sim/CHANGELOG.md Documents the removal of the misleading comment
io-classes/src/Control/Monad/Class/MonadSTM/Internal.hs Optimizes empty queue check to avoid unnecessary reverse operation
io-classes/CHANGELOG.md Documents the performance improvement

@amesgen amesgen added this pull request to the merge queue Aug 7, 2025
Merged via the queue into main with commit aadd360 Aug 7, 2025
14 checks passed
@amesgen amesgen deleted the amesgen/tryReadTBQueueDefault branch August 7, 2025 08:24
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.

Is a comment about laziness in tryReadTBQueueDefault correct?

3 participants