typelevel / scalaz-contrib

Interoperability libraries & additional data structures and instances for Scalaz
http://typelevel.org
MIT License
54 stars 16 forks source link

plus instance for Box #12

Closed xuwei-k closed 11 years ago

larsrh commented 11 years ago

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