Repository navigation
v1.5.0: Add BuildM and modify Repeated and BuildR for efficiency. - #115
Merged
Merged
Conversation
j6carey
force-pushed
the
foldMap-with-oneShot-BuildR
branch
2 times, most recently
from
May 3, 2026 23:12
338a679 to
9979c17
Compare
1.5.0
- As a breaking change, modify `Repeated` and `ToRepeated` to use `foldMap`-style
folds and thereby avoid allocation of `BuildR` functions on the heap. Use
of `FoldR` seemed to force such allocation, even when using `oneShot`.
- Use `oneShot` in `BuildR` and `FixedPrim` to discourage allocation
of such function newtypes on the heap in other scenarios.
- Add `BuildM` and associated features for monadic building.
- Add `PackedField` to support packed fields in a uniform fashion,
and directly implement omission of such a field when it is empty.
- Add `embeddedIfNonempty` as a way to omit empty length-delimited fields.
- Deprecate `FoldR` and `unsafeReverseFoldMapFixedPrim` because
we have stopped using them and plan to remove them in future.
j6carey
force-pushed
the
foldMap-with-oneShot-BuildR
branch
from
May 4, 2026 01:45
e1ef522 to
3c689a9
Compare
riz0id
reviewed
May 4, 2026
riz0id
approved these changes
May 4, 2026
Merged
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.
1.5.0
RepeatedandToRepeatedto usefoldMap-style folds and thereby avoid allocation ofBuildRfunctions on the heap. Use ofFoldRseemed to force such allocation, even when usingoneShot.oneShotinBuildRandFixedPrimto discourage allocation of such function newtypes on the heap in other scenarios.BuildMand associated features for monadic building.PackedFieldto support packed fields in a uniform fashion, and directly implement omission of such a field when it is empty.embeddedIfNonemptyas a way to omit empty length-delimited fields.FoldRandunsafeReverseFoldMapFixedPrimbecause we have stopped using them and plan to remove them in future.