Add explMemberSet method to ExplMembers typeclass#144
Merged
dpwiz merged 7 commits intojonascarpay:masterfrom Mar 10, 2026
Merged
Add explMemberSet method to ExplMembers typeclass#144dpwiz merged 7 commits intojonascarpay:masterfrom
explMemberSet method to ExplMembers typeclass#144dpwiz merged 7 commits intojonascarpay:masterfrom
Conversation
- Introduced `explMemberSet` with a default implementation in `ExplMembers`. - Provided explicit implementations for `IntMap`-based stores `Map`, `Unique` using `keysSet`. - Provided implementations for `EitherStore` to compute `union` of constituent member sets. - Included `explMemberSet` overrides for short circuits where possible such as `HeadStore` and `ChildListStore`. - Modified `apecs-stm` and `apecs-physics` to support `explMemberSet`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
…#4) - Added `mkEitherT` to generate nested `Either` types. - Generalized `makeInstanceTuples` into `makeInstanceFold` which takes a type-folding function. - Reimplemented `makeInstanceTuples` using `makeInstanceFold` and `mkTupleT`. - Implemented `makeInstanceEithers` using `makeInstanceFold` and `mkEitherT`. - Exported the newly created functions (`makeInstanceFold`, `makeInstanceEithers`, `mkTupleT`, `mkEitherT`) from `Apecs.TH`. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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 allows to write this little thingy to get every active entity id:
In theory this should enableThis enables world dumps (e.g. by hunting for Serialiase instances) and introspection for debugging.EitherStorenow can have ExplMembers with union over its parts (instead of intersection like the rest).Apecs.TH exports more utilities to derive collections of instances semi-automatically.
The new Either machinery is used to derive WorldEnumerable type alias that looks like
Either Postion (Either Velocity (Either ...)).