Companion code for paper "Imperative Functional Programs that Explain their Work", Wilmer Ricciotti, Jan Stolarek, Roly Perera and James Cheney, ICFP 2017, Oxford, UK
Result type proposed above is now implemented as Outcome and eval & slice functions now produce/consume Outcomes. No need to use pattern synonyms here. Closing.
@jamescheney says:
This might be doable using pattern synonyms.