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

Translate types of the Gospelstdlib #158

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Conversation

shym
Copy link
Contributor

@shym shym commented Oct 19, 2023

Add a tystdlib to the Context, similar to the stdlib but for types
Use tystdlib in Ocaml_of_gospel functions translating types
Adapt QCheck-STM to feed the context to those translation functions
Add a new test for QCheck-STM using the sequence type for the model

Closes #155

Copy link
Collaborator

@n-osborne n-osborne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

n-osborne/ortac#tystdlib-param proposes a small refactoring.
It reduces the duplicated code but may not be as readable as I think.
Feel free to ignore.

shym and others added 2 commits October 23, 2023 12:15
Add a `tystdlib` to the Context, similar to the `stdlib` but for types
Use `tystdlib` in `Ocaml_of_gospel` functions translating types
Adapt QCheck-STM to feed the context to those translation functions

Co-authored-by: Nicolas Osborne <nicolas.osborne@tarides.com>
Co-authored-by: Samuel Hym <samuel.hym@rustyne.lautre.net>
@shym
Copy link
Contributor Author

shym commented Oct 23, 2023

Thank you! I agree with the proposed improvement, and even dropped the fold_X_namespace specialized functions altogether.

@n-osborne n-osborne merged commit 83cfd5c into ocaml-gospel:main Oct 23, 2023
2 checks passed
@shym shym deleted the tystdlib branch October 23, 2023 11:55
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.

Need to qualify type constructor in state type declaration
2 participants