-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make Result
type :-
friendly
#2
Conversation
Add `IsFailure`, `PropagateFailure`, and `Extract` members to datatype `Result` to make it usable with `:-` assignments in Dafny. Update example to use `:-` with `Result`.
print fileResult.value, "\n"; | ||
} | ||
var _ :- fs.CreateFile("test.txt"); | ||
var _ :- fs.WriteFile("test.txt", "Test dummy file"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I implemented :-
, I intended to support statements starting with :-
, so that you could drop the var _ :-
part in the above code. Did you try that? Does it work? Or do you get an error saying that there must not be an Extract
method? In any case, I think there should still be a TODO note here
This has now been added in another PR. |
Dummy verification-breaking change
Also applies dafny format and changes the lit commands to use the new CLI. Co-authored-by: Robin Salkeld <[email protected]>
* Working on reusable tests * Debugging * Debugging #2 * Debugging #3 * Debugging #4 * Debugging #4 * Debugging #5 * Debugging #6 * Debugging #7 * Debugging #8 * Debugging #9 * Debugging #10 * Debugging #11 * Debugging #12 * Debugging #13 * Debugging #14 * Debugging #14 * Debugging * Debugging * Debugging * Debugging * OK, except disabling 3.13.1 and nightly-latest until setup-dafny-action is fixed * OK, except disabling 3.13.1 and nightly-latest until setup-dafny-action is fixed * Fixing the concurrency check * Old edits * Edits to examples * Touchups to examples and library * Math relations and examples * Some docstring documentation * Some docstring documentation * typo * Formatting * Removing semicolon * Adjusting for Dafny 3 * Attempt to fix proof in ld dafny versions * Fixing up docstrings * Fixed examples * Fixed formatting * Fixed formatting * Formatting * Formatting --------- Co-authored-by: davidcok <[email protected]>
Add
IsFailure
,PropagateFailure
, andExtract
members to datatypeResult
to makeit usable with
:-
assignments in Dafny.Update example to use
:-
withResult
.