Skip to content

Comments

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

Merged
danicheg merged 1 commit intotypelevel:mainfrom
danicheg:empty-option-instance
Mar 30, 2025
Merged

Add the Empty[Option[A]] instance in alleycats #4733
danicheg merged 1 commit intotypelevel:mainfrom
danicheg:empty-option-instance

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