-
Notifications
You must be signed in to change notification settings - Fork 72
Conversation
It breaks Scala implicit inference, maybe because of the covariance/contravariance issue. Not sure what it is, but in any case we only have a single instance, so abstraction is premature (my rule of thumb is you need 3 plausible instances to make it worthwhile to abstract). So in this commit we replace constrained by ordered throughout.
After the specialization to Ordered, everything compiles now under dotty.
Two FIXMEs in Test.scala remain, where the correct type is not yet inferred under dotty.
Always define in parallel with fromIterable mapFromIterable orderedFromIterable
They now are all protected[this]
... into an Ops trait with 3 parameters. Also, drop ImmutableBuilders, we don't seem to need them.
Glad this idea worked! |
There is an issue because |
To give you more information, the heart of the issue is here:
The problem is that def fromIterable[B](c: Iterable[B]): IndexedView[B] Which is not possible when the given |
@julienrf Good analysis, thanks! I fixed it by not having IndexedView inherit from Seq. |
98651a2
to
63e6c17
Compare
I added one commit that essentially fixes some |
So what about TraverseTest? This is hardly a problem we can ignore. We need these methods in the standard library and I'm pretty sure they will also be common in third-party code. |
The essence of this simplification here seems to be the removal of all the work I did on |
Merge ops, mappings, and like traits into an Ops trait with 3 parameters.
Also, drop ImmutableBuilders, we don't seem to need them.