Add |||
operator for alternatives forming a shapeless Coproduct
#134
Labels
|||
operator for alternatives forming a shapeless Coproduct
#134
The
|
operator requires that the types of the two rules being "or-ed" are "compatible".In most cases this is what you want, i.e.
(a: Rule1[Int]) | (b: Rule1[String])
shouldn't compile.Sometimes, however, it'd be convenient if there was a variant of
|
(e.g. called|||
) which automatically created a Coproduct of it's operands, if required:The text was updated successfully, but these errors were encountered: