Does Cochoice have laws? Am I right in assuming that its gist is basically "If you get a value on the wrong side, pass it back in again until you get one on the correct side"? If so, then wouldn't any ArrowChoice also be a Cochoice, with:
unright :: (ArrowChoice p) => p (Either a c) (Either b c) -> p a b
unright a = let go = ((go . arr Left) ||| id) . a in go . arr Right
That seems to be equivalent to the instance definition for Cochoice (->).
Does Cochoice have laws? Am I right in assuming that its gist is basically "If you get a value on the wrong side, pass it back in again until you get one on the correct side"? If so, then wouldn't any ArrowChoice also be a Cochoice, with:
That seems to be equivalent to the instance definition for Cochoice (->).