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

Add Resource Based Middlewares To BracketRequestResponse. #4026

Merged
merged 3 commits into from Dec 18, 2020

Conversation

isomarcte
Copy link
Member

As requested by (and effectively written by) @nigredo-tori (#3977 (comment))

@isomarcte
Copy link
Member Author

Is lmap not on cats-core_2.12?

The compiler can't figure out the implicits in 2.12.
@rossabaker rossabaker added the enhancement Feature requests and improvements label Dec 17, 2020
val P: Profunctor[Kleisli[OptionT[F, *], *, *]] = Profunctor[Kleisli[OptionT[F, *], *, *]]
(contextRoutes: ContextRoutes[A, F]) =>
val contextRoutes0: ContextRoutes[(A, F[Unit]), F] =
P.lmap(contextRoutes)(_.map(_._1))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If using Profunctor here is so painful, how about doing contextRoutes.local(_.map(_._1)) instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nigredo-tori sure. Updated.

@rossabaker rossabaker merged commit 26890b6 into http4s:series/0.21 Dec 18, 2020
@isomarcte isomarcte deleted the bracket-resource branch December 18, 2020 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants