Draft
Conversation
- Support is provided by the Z module of the zarith package - when writing a literal number, you can add a suffix to tell the compiler what size it will use. no suffix means 32bits - add int type parameterized by bit length : i32, i64, i128, i69420... (no restriction for now as llvm is able to deal with it) idealy, for literals, there should be a type inference so we don't need to specify a suffix when dealing with type different than i32 but for now you must provide it. - check for out_of_bounds literal - int literals can have '_' separators : 1_000_000 is now valid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This aims at removing some boilerplate code by bringing mostly dependency-free PPX rewriters, maybe create one for our needs as well. As they are an AST to AST transformation, we can pretty-print it back to a PPX-free code to feed it to coq-of-ocaml for the long-term goal of proving the compiler using Coq.
Interesting PPXes :