Note to self: an Empty instance for Box is non-trivial, because there are two candidates for emptiness, Empty and Failure. Thanks to law checking, the following offending invocation has been caught:
val fail: Box[Int] = Failure("")
fail <+> empty
// results in Empty
Note to self: an
Empty
instance forBox
is non-trivial, because there are two candidates for emptiness,Empty
andFailure
. Thanks to law checking, the following offending invocation has been caught: