What is the recommended way to handle multiple of the same effects? #315
Answered
by
arybczak
tonyalaribe
asked this question in
Q&A
-
Hi, If I have 2 of the same effect. For example, the DB effect is used with different interpreters. How do I decide which of the two to use at the call site? Assume both of those DB effects store data in completely separate places. |
Beta Was this translation helpful? Give feedback.
Answered by
arybczak
Mar 20, 2025
Replies: 1 comment 1 reply
-
If it's your effect (i.e. you have control over its definition), you can add a phantom level type parameter to it. Otherwise you can use Effectful.Labeled to assign a label to them. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
tonyalaribe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If it's your effect (i.e. you have control over its definition), you can add a phantom level type parameter to it.
Otherwise you can use Effectful.Labeled to assign a label to them.