The measurable coproduct structure on Except #
Except ε α is given the coproduct measurable space generated by its error and ok
constructors. This is the measurable structure needed to retain exceptions as outcomes when
interpreting ExceptT probabilistically.
The coproduct measurable space on Except ε α.
Equations
A set of exception values is measurable exactly when both constructor preimages are measurable.
The image of a measurable set under Except.error is measurable.
The image of a measurable set under Except.ok is measurable.
Except.error embeds the error branch into the coproduct measurable space.
Except.ok embeds the successful branch into the coproduct measurable space.
A function out of Except ε α is measurable when both constructor branches are.
Mapping the successful value of an exception preserves measurability.