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 mkString to HList and tuples #148
Conversation
@@ -811,18 +811,17 @@ object tuple { | |||
* | |||
* @author Miles Sabin | |||
*/ | |||
trait ToList[T, Lub] extends DepFn1[T] |
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.
This doesn't look quite right ... why is there ToList-related stuff in this PR?
Aside from the stray |
The ToList for tuples had an unconstrained output type, unlike that for hlists which states that the result is a List[Lub]. The implementation relies on converting to a List before calling mkString on it, I can't call mkString on an arbitrary type. Of course I could add a MkString type class for tuples but I figured that the return type for ToList should be List[Lub]. |
OK, gotcha ... I'm going to hold off on this until #119 is merged. |
Could you rebase this now that #119 has been merged? |
I think that #119 should subsume your As an aside, I would prefer that type class signature to have been written as,
|
Could you update this now that #119 has been merged? :-) |
Updated |
Cool ... I'm not persuaded by the defaulted variants though. I think |
Grr, updated. It's a simpler commit now but I still think ⸨⸩ are brilliant delimiters for a hlist, like a tuple but more so ! I had the 3 variants to mimic those on Traversable. |
Less is more ;-) Merging now ... many thanks ... much appreciated :-) |
Add mkString to HList and tuples
Don't worry stacy... I once tried to use «» for the interpolation in boilerplate, and was told it was "too cute". You're not the only person to experience unicodophobia here :) |
:D |
No description provided.