Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PushSupport.collectResponse: simplify code. #2531

Merged
merged 1 commit into from Apr 28, 2019
Merged

Conversation

@diesalbla
Copy link
Contributor

@diesalbla diesalbla commented Apr 26, 2019

We try to simplify the code of PushSupport.collectResponse.

  • We extract the main function from the foldLeft into a separate local function.
  • Since we are not staying in the OptionT, we replace the special combinators semiFlatMap, mapF, or liftT, by the Monad methods of the base F, and pattern-matches on the Option constructors.
@diesalbla diesalbla force-pushed the push_simplify branch 2 times, most recently from dd58036 to f04bc21 Apr 27, 2019
We try to simplify the code of PushSupport.collectResponse.
- We extract the main function from the foldLeft into a separate
  local function.
- Since we are not staying in the `OptionT`, we replace the special
  combinators `semiFlatMap`, `mapF`, or `liftT`, by the Monad  methods
  of the base `F`, and pattern-matches on the Option constructors.
Copy link
Member

@rossabaker rossabaker left a comment

This would benefit from being a chain instead of a vector, but that would be better as a separate PR, as it would break compatibility.

Build failures are unrelated.

@aeons aeons merged commit 0d47486 into http4s:master Apr 28, 2019
1 check failed
@diesalbla diesalbla deleted the push_simplify branch May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants