Tight-coupling between Traverse and Foldable is a downstream burden
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 5.5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
Hi! I have many cases where I just need a Traverse instance for my data types (very common in recursion-abstraction as it's required for monadic morphisms, {cata,ana,hylo,etc}M). In Cats Traverse extends Foldable which requires me to implement foldLeft and foldRight even though I have no need of those. If the folds were implemented via traverse and overriding was for specialisation/optimisation that it'd be fine but that's not the case.
Does Traverse really need to extend Foldable? Can we uncouple them?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Traverse and Foldable typeclass definitions and reviewing how their inheritance is used by existing instances. Determine the compatibility and migration implications of uncoupling them; done requires an agreed design and corresponding changes across affected instances and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100