Internal: API for safe boxes#1074
Closed
gpetiot wants to merge 10 commits intoocaml-ppx:masterfrom
gpetiot:safe-box
Closed
Internal: API for safe boxes#1074gpetiot wants to merge 10 commits intoocaml-ppx:masterfrom gpetiot:safe-box
gpetiot wants to merge 10 commits intoocaml-ppx:masterfrom
gpetiot:safe-box
Conversation
Julow
reviewed
Oct 14, 2019
Collaborator
Julow
left a comment
There was a problem hiding this comment.
Could you give an example of how it's used ?
Collaborator
Author
I added an example in Fmt_ast (unfortunately it requires an additional parameter |
Julow
reviewed
Oct 16, 2019
Collaborator
Julow
left a comment
There was a problem hiding this comment.
Can you show an example in the code where we need to remove boxes if there is only one element ?
Also, can't this be solved by conventions and less intrusives Fmt functions ?
What do you think of a simpler box_list : (t -> t) -> ?sep:t -> t list -> t that would do the logic in box_if ?
Closed
Collaborator
Author
|
Closing for now |
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.
I started working on a better way to use boxes:
Fmt.nooplater), but can box 1 element if we use a flag (we should try to eliminate these cases later)Fmt.tSo far it is used inside a
Safemodule to distinguish with the legacy (soon unsafe) functions, the substitutions in legacy code would be done step by step as there is a lot of code to be modified, but it would be nice to use this API for bugfixes and new developments.Add box names after #1083 is merged.