add possibility to use → in route pattern, in addition to -> #2109
Conversation
XXX: due to infix operation precedence, → has a lower priority than /. So you have to use parentheses in pattern matching when using this operator.
XXX: due to infix operation precedence, → has a lower priority than /. So you have to use parentheses in pattern matching when using this operator. So this works case GET → (Root / "test.json") => And, this won't case GET → Root / "test.json" => It gives you something like this
|
Do you still like the feature, given the limitation? |
Yes, cause on another I use a rule to rewrite |
If you're on the 0.18 series, we could retarget this for release-0.18.x and get it in a patch sooner. Otherwise, we can target this for the 0.19 series. |
@@ -17,6 +17,7 @@ trait Http4sDsl[F[_]] extends Http4s with Methods with Statuses with Responses[F | |||
val :? : impl.:?.type = impl.:? | |||
val ~ : impl.~.type = impl.~ | |||
val -> : impl.->.type = impl.-> | |||
val → : impl.->.type = impl.-> |
rossabaker
Sep 24, 2018
Member
I'd put a scaladoc on this to note the precedence issue. It's obvious when you mention it, but I didn't think about it beforehand.
I'd put a scaladoc on this to note the precedence issue. It's obvious when you mention it, but I didn't think about it beforehand.
scaladoc added. And I'm currently using the 0.19 series :) |
|
No description provided.