I think the implementation choices around exceptions in STM are well informed and reasoned choices, but other choices could have been made. One motivating reason for exceptions having abort semantics, for instance, is asynchronous exceptions (see the
Exceptions section of
Composable Memory Transactions). Caught exceptions thrown within a transaction have the same abort semantics for the nested transaction (as your example shows), but there is no way to know that `MyEx` isn't thrown asynchronously leading to rather difficult to reason about outcomes. I think it would be straight forward to modify this behavior in the RTS, simply do not discard the transactional record of the nested transaction (
https://github.com/ghc/ghc/blob/master/rts/PrimOps.cmm#L1390).