Determine whether we need to worry about lawfulness of Endpoint's applicative instance
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
See #555 for discussion. The issue is that `Endpoint` has an `Applicative` instance that isn't 100% lawful, since if we `product` together `Endpoint[A]` and `Endpoint[B]` the second one determines the status code and the status code of the first is ignored.
We could fix this by having a `Semigroup` instance for status codes such that `Ok` combined with anything else is the anything else. Off the top of my head I'm not sure this makes sense, but we should think about it.
Contributor guide
Research direction
Start by reading the discussion in #555, then inspect Endpoint's Applicative instance and its product behavior around status codes. Compare the current behavior with the relevant Applicative law and determine whether status-code combination has a coherent Semigroup interpretation; done means reaching and documenting a decision about the instance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100