We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1478cca + 5f37e55 commit 726be05Copy full SHA for 726be05
1 file changed
alleycats-core/src/main/scala/alleycats/Empty.scala
@@ -77,7 +77,10 @@ object Empty extends EmptyInstances0 {
77
78
}
79
80
-private[alleycats] trait EmptyInstances0 extends compat.IterableEmptyInstance with EmptyInstances1
+private[alleycats] trait EmptyInstances0 extends compat.IterableEmptyInstance with EmptyInstances1 {
81
+ private[this] val emptyOptionSingleton: Empty[Option[Nothing]] = Empty(None)
82
+ implicit def alleycatsEmptyForOption[A]: Empty[Option[A]] = emptyOptionSingleton.asInstanceOf[Empty[Option[A]]]
83
+}
84
85
private[alleycats] trait EmptyInstances1 extends EmptyInstances2 {
86
// If Monoid extended Empty then this could be an exported subclass instance provided by Monoid
0 commit comments