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

Auto-gen to/from json via deriving yojson #34

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

benbellick
Copy link
Contributor

@benbellick benbellick commented Aug 23, 2024

As mentioned in the other PR, I wanted to see if I could get the to/from json functions auto generated via deriving yojson. This is just a pass I took which I haven't tested yet, but I wanted to get some feedback. If this seems more confusing, we can always just go back. Thanks! 😄

@benbellick
Copy link
Contributor Author

Also not sure how appropriate the way I introduced the to/from functions are (by shadowing the original modules).

Another idea to make things even simpler is to use Zarith and Ptime's to_string and from_string implementation.

@@ -1,5 +1,81 @@
module Imandra_ptime = struct
Copy link
Contributor Author

@benbellick benbellick Aug 24, 2024

Choose a reason for hiding this comment

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

Realizing now that I can make this even better with the usage of Imandra-codegen! Will give that a try later.

Base automatically changed from description-in-instructions to master August 30, 2024 18:30
@sam-tombury sam-tombury removed their request for review September 12, 2024 16:02
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.

1 participant