effect icon indicating copy to clipboard operation
effect copied to clipboard

From Discord: Extending TaggedError for Either.gen

Open effect-bot opened this issue 2 years ago • 0 comments

Summary

The discussion revolves around extending TaggedError to be used with Either.gen. Initially, it is mentioned that it may not be possible because the tag field is already taken in Either. However, the idea of using the _op field instead is proposed. It is argued that using _op for everything could make matching on left/right of Either more awkward. The suggestion is made to update isRight, isLeft, and Match to use _op instead of _tag. However, it is pointed out that Match currently looks at the tag field, so a new Match.op would need to be introduced. The conversation ends with the suggestion to have Either with a Match.either({ right, left }) syntax, but it is mentioned that this functionality already exists in Either.

Discord thread

https://discord.com/channels/795981131316985866/1169387468068499587

effect-bot avatar Nov 01 '23 22:11 effect-bot