Closed
Conversation
Member
|
You are moving some definitions away from their devices into another module. I'm not particularly fond of that. I think I would prefer to try to have self-contained devices as much as possible. I'm surprised you didn't started that work by changing functoria. Most of the subtle code emission starts there. |
Contributor
Author
|
Right, I'll first start by making private per-device modules. This will be easier to reexport in |
Member
|
It's a good idea to simplify code generation, however I'm not particularly fond of introducing a ppx dependency in mirage before the ppx tooling is ready. Happy to revive once this is ready. |
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.
Hi,
This is more of an experiment before I go further on this.
I noticed that some OCaml code is generated and that is uses string interpolation.
I tried something different: define this code using metaquot, and pretty print using
Pprintast.While this does not ensure that the code compiles, it's a bit better since we at least ensure that it is a valid OCaml expression. On the other hand, this pulls
ppx_tools_versioned(and so OMP and compiler-libs), so this can have library size implications (but if this is just for the CLI it might be OK).What do you think? Is this a direction I should try to follow?
Note that this branch includes #928, so only the last commits are relevant.
cc @hannesm @samoht
Thanks in advance for your input!