Write a Blog >>
ICFP 2018
Sun 23 - Sat 29 September 2018 St. Louis, Missouri, United States
Mon 24 Sep 2018 15:00 - 15:23 at Stifel Theatre - Continuations and Effects Chair(s): Martin Elsman

Delimited continuations are the mother of all monads! So goes the slogan inspired by Filinski’s 1994 paper, which showed that delimited continuations can implement any monadic effect, letting the programmer use an effect as easily as if it was built into the language. It’s a shame that not many languages have delimited continuations.

Luckily, exceptions and state are also the mother of all monads! In this Pearl, we show how to implement delimited continuations in terms of exceptions and state, a construction we call thermometer continuations. While traditional implementations of delimited continuations require some way of “capturing” an intermediate state of the computation, the insight of thermometer continuations is to reach this intermediate state by replaying the entire computation from the start, guiding it using a recording it so that the same thing happens until the captured point.

Along the way, we explain delimited continuations and monadic reflection, show how the Filinski construction lets thermometer continuations express any monadic effect, share an elegant special-case for nondeterminism, and discuss why our construction is not prevented by theoretical results that exceptions and state cannot macro-express continuations.

Mon 24 Sep

icfp-2018-papers
15:00 - 16:10: Research Papers - Continuations and Effects at Stifel Theatre
Chair(s): Martin ElsmanUniversity of Copenhagen, Denmark
icfp-2018-papers15:00 - 15:23
Talk
DOI
icfp-2018-papers15:23 - 15:46
Talk
Youyou CongOchanomizu University, Japan, Kenichi AsaiOchanomizu University
DOI
icfp-2018-papers15:46 - 16:10
Talk
Oliver BračevacTU Darmstadt, Nada AminUniversity of Cambridge, Guido SalvaneschiTU Darmstadt, Sebastian ErdwegDelft University of Technology, Netherlands, Patrick EugsterPurdue University, Mira MeziniTU Darmstadt
DOI