Skip to content

Conversation

@ivan-gavran
Copy link
Collaborator

This PR adds to the sum type in the quint model one option which has a record as its content.
This will hopefully be useful as a reference because Quint cheatsheet takes this as an example for sum types.

@ivan-gavran ivan-gavran requested a review from romac December 20, 2023 10:28
@romac
Copy link
Contributor

romac commented Dec 20, 2023

Great idea! I wonder if instead of adding a variant to Option we can instead define a new sum type and perhaps show two ways of having records with the variant in Rust, ie.

enum A {
  B(C),
  D { x: i32, y: bool }
}

where C is a struct, and with some better names.

What do you think?

@ivan-gavran
Copy link
Collaborator Author

Agree, it will make it clearer! I'll update the PR

@ivan-gavran ivan-gavran marked this pull request as draft December 21, 2023 10:38
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.

3 participants