Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

RustanLeino
Copy link
Collaborator

Add IsFailure, PropagateFailure, and Extract members to datatype Result to make
it usable with :- assignments in Dafny.

Update example to use :- with Result.

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");
Copy link
Contributor

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

@RustanLeino
Copy link
Collaborator Author

This has now been added in another PR.

robin-aws added a commit that referenced this pull request Mar 2, 2022
Dummy verification-breaking change
davidcok pushed a commit that referenced this pull request Feb 14, 2023
robin-aws added a commit that referenced this pull request Feb 20, 2023
Also applies dafny format and changes the lit commands to use the new CLI.

Co-authored-by: Robin Salkeld <[email protected]>
davidcok pushed a commit that referenced this pull request Mar 3, 2023
davidcok added a commit that referenced this pull request Apr 17, 2023
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants