-
Notifications
You must be signed in to change notification settings - Fork 79
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
Is there a way to pass a named spec function as a spec_fn
argument?
#1266
Comments
The problem is that we need to coerce the named function to the spec_fn. Unfortunately, it's impossible to tell syntactically if something needs this coercion. It might be possible to define |
Could we add syntactic support for the developer to explicitly coerce it? E.g.,
|
You can do |
Wait, that might not work. I think closure_to_fn_spec is a magic builtin that really only works for closures. It could be made to work, though. |
Indeed. It rather reasonably objects:
|
At present, it does not seem to be possible to pass a named spec function to a function that's expecting a
spec_fn
. For example, Verus yells at me when I try the obvious approach:It seems okay with passing in a closure instead:
but that makes subsequent triggering more annoying; i.e., I end up writing:
instead of what I'd like to write, which is:
The text was updated successfully, but these errors were encountered: