-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add bindFirst and curried methods for Poly #708
Conversation
Codecov Report
@@ Coverage Diff @@
## master #708 +/- ##
===========================================
- Coverage 83.58% 61.59% -21.99%
===========================================
Files 66 94 +28
Lines 2608 3552 +944
Branches 90 114 +24
===========================================
+ Hits 2180 2188 +8
- Misses 428 1364 +936
Continue to review full report at Codecov.
|
@milessabin Why did the code coverage change? |
This looks very useful ... thanks! A few things before I merge. Do these work as expected as arguments to a Also some stylistic things. shapeless intentionally doesn't use access modifiers (other than |
Yes, However, there is a limitation: The newly created |
Still waiting on tests and the stylistic changes requested. |
Rebased to remove whitespace from diff and add some tests with |
Thank you for picking up this PR @joroKr21 |
} | ||
} | ||
|
||
final case class Curried[F, ParameterAccumulator <: HList](parameters: ParameterAccumulator) extends Poly1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Atry do you remember what the ParameterAccumulator
type parameter is for?
It seems unused to me = always HNil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
object p extends Poly3 {
implicit def x = at[Int, Double, String] { (i, d, s) =>
s"$i, $d, $s"
}
}
val c = Poly.curried(p)
val c1 = c(1)
val c2 = c1(42.5)
Try printing c2
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok that makes sense 👍
No description provided.