Do not use constraints marked as warning or note for inference
Constraints not resulting in errors are not required to succeed, i.e. they allow other solutions that do not satisfy them. It makes sense to not propagate information inferred from such a constraint.
Submitted by Hendrik van Antwerpen on 7 September 2016 at 16:48
Issue Log
It would be nice if you could set the error level on a list of constraints, like
(C1 ... Cn) | warning
, and all constraints in the list get the level of the list. Be careful about(C | error) | warning
. We could (1) disallow it / make it a warning anyway, or (2) keep it an error. I think (1) makes a bit more sense.
Forbidding inference altogether is too much. Consider
(Var{x} |-> d, d : ty) | warning
, which needs to inferd
for the whole thing to work. Some kind of stratification might work here, first solving error constraints, then warnings, then notes. Issue https://yellowgrass.org/issue/NaBL2/6 is a bit relaed here, because the condition should only contribute to the final solution, if it can be satisfied.
Log in to post comments