Yieldable Errors are special types of errors that can be yielded directly within a generator function using Effect.gen.
These errors allow you to handle them intuitively, without needing to explicitly invoke Effect.fail. This simplifies how you manage custom errors in your code.
Data.Error
The Data.Error constructor provides a way to define a base class for yieldable errors.
Example (Creating and Yielding a Custom Error)
Data.TaggedError
The Data.TaggedError constructor lets you define custom yieldable errors with unique tags. Each error has a _tag property, allowing you to easily distinguish between different error types. This makes it convenient to handle specific tagged errors using functions like Effect.catchTag or Effect.catchTags.