[checking] Generate Foldable derived members - #231
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (36)
📒 Files selected for processing (36)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## traversable-deriving #231 +/- ##
========================================================
- Coverage 83.78% 83.67% -0.12%
========================================================
Files 158 159 +1
Lines 34700 35439 +739
Branches 34700 35439 +739
========================================================
+ Hits 29075 29655 +580
- Misses 3036 3131 +95
- Partials 2589 2653 +64 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Complete derived
FoldableandBifoldabledictionaries using the canonical PureScript definitions:Foldable:foldr,foldl, andfoldMapBifoldable:bifoldr,bifoldl, andbifoldMapThe checking prelude now includes the canonical
SemigroupandMonoiddefinitions required byfoldMapandbifoldMap. Generated members support products, sums, records, recursive types, nested unary applications, and nested binary applications while preserving the expected fold direction and field order.PureScript compatibility
For a right-only occurrence such as
p Int a, upstreampurscan derive through either a unary instance for the partial application (Foldable (p Int)/Traversable (p Int)) or a binary instance for the constructor (Bifoldable p/Bitraversable p). Alexandrite previously required the unary route even when only the canonical binary evidence was available.This change matches
pursby:The compatibility failure is preserved in an earlier commit in this PR, followed by the implementation that turns those snapshots into successful derived instances.
Implementation decisions
Tests
Semantic fixtures cover:
FoldabletypesBifoldablesums, products, unary and binary nesting, and recordsValidation completed:
just formatgit diff --checkjust t checkingjust t semanticcargo check -p checking --testscargo nextest run -p checking(30 tests passed)The final implementation was reviewed by Oracle and approved with no blockers.
Stack
This PR is based on and should be reviewed after #230. Its base branch is
traversable-deriving; once #230 lands, this PR can be retargeted tomain.