Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I gave it a try and added some arithmetics that are going to be required by my use case.
Unlike the existing ones, those I added are all predicates. They all require full instantiation, apart from IsNeg, which will negate an integer if not out of bounds.
Initially I wanted to make the predicates fill in variables with matching values, but that quickly leads to i64-sized loops.
While I don't expect logru to support clp(fd), I think there's a continuum of ways to make arithmetics resolve to something useful. With one variable, the syntax could look like:
where the resolver could look at all conditions to see if they are bounded before proceeding.
Does that sound like anything desireable?
Another thing is the lack of messages when there's a variable which is not instantiated enough. I epect that to be the main thing driving people away. I could give it a shot and change impl Resolver to return an error message, and pass it all the way to the user. Interested?