~/talk

Delimited Continuations, Demystified

Talkat ZuriHac 2023 · 2023-06-10..06-12· [functional-programming]
slides:none on file

GHC gains native first-class delimited continuations in GHC 9.6, implemented as a small runtime patch completed after a three‑year proposal cycle and finished while working at Tweag. The implementation represents continuations as sequences of stack-frame memcopy to the heap and back, captures delimited regions with prompt tags, and supports control/prompt (and thus algebraic‑effects style APIs). It works and is fast in practice, with caveats: continuations live in IO, lazy code limits use, possible space‑leak patterns, and OCaml-style one‑shot optimizations trade flexibility for performance.

AI-written summary · about

  1. 0:00Introduction
  2. 0:42History of delimited continuations
  3. 3:53First-class continuations
  4. 15:33Formalizing continuations
  5. 24:05Native delimited continuations
  6. 36:21Typing challenges
  7. 49:11Delimited continuations in Haskell
  8. 54:25Efficient GHC implementation
  9. 1:09:24Why GHC didn’t have delimited continuations earlier
  10. 1:14:39Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.