Skip to content

[prelude] introduce Env.getAll/useAll + scaladoc improvements - #1099

Merged
hearnadam merged 1 commit into
mainfrom
env-get-all
Mar 19, 2025
Merged

hearnadam merged 1 commit into
mainfrom
env-get-all

Conversation

@fwbrasil

Copy link
Copy Markdown
Collaborator

Problem

The Env effect doesn't provide a way to obtain multiple values at once. Also, the scaladocs of Env and Local don't provide a good mental model for when to use the effects since they're similar

Solution

Introduce Env.getAll and Env.useAll that allows the user to request multiple values via a type intersection, operating at the level of TypeMap. Additionally, improve the scaladocs of Env and Local to provide a better mental model regarding the effects.

Notes

  • I've renamed runTypeMap to runAll for consistency

@hearnadam
hearnadam merged commit c8d9c1c into main Mar 19, 2025
@hearnadam
hearnadam deleted the env-get-all branch March 19, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants