Skip to content

Add the Empty[Option[A]] instance in alleycats #4733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 30, 2025

Conversation

danicheg
Copy link
Member

It turns out that an instance of alleycats.Empty[Option[A]] isn't automatically derived if there is no Semigroup instance for A in scope. See the example: https://scastie.scala-lang.org/gndrZPa1QA6deeYzhNhvQw. Interestingly, adding an import of alleycats.std.option doesn't help either.

@danicheg danicheg force-pushed the empty-option-instance branch from e87af48 to 5f37e55 Compare March 29, 2025 06:20
@danicheg danicheg requested a review from johnynek March 29, 2025 06:35
@danicheg danicheg merged commit 726be05 into typelevel:main Mar 30, 2025
16 checks passed
@danicheg danicheg deleted the empty-option-instance branch March 30, 2025 07:19
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