optics-dev / optics-dev/Monocle

Traversal encoding

Open
#766 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.x
Dominant language
Scala
Stars
1.7k
Forks
207
Avg merge
7h 59m
Merged PRs (30d)
5

Description

In Monocle 1.x and 2.x, we implemented Traversal using the Van Laarhoven encoding, meaning all functions within Traversal are defined in terms of modifyF:

trait Traversal[A, B] {
  def modifyF[F[_]: Applicative](f: B => F[B])(from: A): F[A]
}

In 3.x, we are trying to keep the core module without external dependency, so the question is:

How can we implement Traversal without Applicative?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Traversal abstraction and its modifyF signature described in the issue, then inspect how the 3.x core module avoids external dependencies. Done requires a decided, dependency-free implementation approach for Traversal, with its impact on the existing API and behavior resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.