jstolarek / slicer

Companion code for paper "Imperative Functional Programs that Explain their Work", Wilmer Ricciotti, Jan Stolarek, Roly Perera and James Cheney, ICFP 2017, Oxford, UK
http://dl.acm.org/citation.cfm?id=3110258
GNU General Public License v3.0
6 stars 0 forks source link

Use pattern synonyms for better control of whether computations returned or raised. #39

Closed jstolarek closed 7 years ago

jstolarek commented 7 years ago

@jamescheney says:

My suggestion would be to consider making the implementation closer to the paper by introducing a new type:

data Result = RHole | RRet v | RRaise v

and changing eval, forward and backward slicing to produce / consume Results rather than Values

This might be doable using pattern synonyms.

jstolarek commented 7 years ago

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.