-
Notifications
You must be signed in to change notification settings - Fork 157
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
RFE: A version of Inference[P, C] that fails for implicit chaining #755
Comments
implicit def greaterInference[C, A, B](
implicit
wa: WitnessAs[A, C],
wb: WitnessAs[B, C],
nc: Numeric[C]
): Greater[A] ==> Greater[B] = Inference(nc.gt(wa.snd, wb.snd)) we could now just demand a check at the type-level implicit def greaterInference[A, B](
implicit ev: A > B
): Greater[A] ==> Greater[B] = Inference() With that change, #454 is a similar issue. |
I went through a similar transition with coulomb. Is migrating |
singleton-ops doesn't seem to have the primitives to support StringInference rules |
overall, though, the number of places where |
I could use a version of
Inference
that always fails to manifest. For example, the following inference "fails" but it doesn't fail to manifest, it just has afalse
value:This works for the casting in
InferMacro
andautoInfer
but it's limited in how it can be used in chained implicits.I could use an alternative that will fail like so:
Given the current design, I think that another similar macro which returns a chainable inference type but only if
inference.notValid
is false, instead of just doing an implicit value conversion.The text was updated successfully, but these errors were encountered: