Multi-way selective functors. Given a computation that produces a value of a sum type, we can match it to the corresponding computation in a given product type.
For greater similarity with matchCases, we could have given the following type to match:
match :: f (Sigma t) -> (t ~> Case f a) -> f a
Methods
match :: Enumerable t => f (Sigma t) -> (forall x. t x -> f (x -> a)) -> f a