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

various cleanups in Protobuf #482

Merged
merged 1 commit into from
Nov 20, 2024
Merged

various cleanups in Protobuf #482

merged 1 commit into from
Nov 20, 2024

Conversation

cdisselkoen
Copy link
Contributor

  • refactors BParsec.ParseResult from an inductive where the pos field was duplicated across variants, to a structure that also gets to make use of the built-in Except type
  • redefines BParsec.run! in terms of BParsec.run, and improves the panic message
  • defines a new helper BParsec.inspect and redefines a lot of existing helpers using it. (also uses it elsewhere in other files)
  • redefines BParsec.eof and utf8DecodeChar using do notation for clarity
  • adjusts proofs for all of the above changes

Signed-off-by: Craig Disselkoen <[email protected]>
Copy link
Contributor

@emina emina left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@john-h-kastner-aws john-h-kastner-aws left a comment

Choose a reason for hiding this comment

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

Seems reasonable

@cdisselkoen cdisselkoen merged commit 6474688 into main Nov 20, 2024
6 checks passed
@cdisselkoen cdisselkoen deleted the cdisselkoen/protobuf branch November 20, 2024 22: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.

3 participants