replace custom wf check with well_formed constructor #177
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.
This change is mostly motivated by a comment on
prove_where_clause_well_formed
:I originally started with converting it to a
judgement_fn
but found I was duplicating a lot of logic fromprove_wc
which already exists. So I settled on moving the logic to aWhereClause::well_formed
method which creates a set of goals to prove, and then callsprove_wc
on those goals.I'm not certain this is an improvement on the current code. There is more code being run (constructing a set of goals, then checking them is more than just checking), so I wouldn't expect any performance improvement, and it sort of looks like the same code just in a different place, so it's not removing much. The only justification I have is that I wouldn't ever do the reverse of this change (remove the
well_formed
constructor in favour of custom well_formed check).