;;;; The dev-build break loop — spec-conditions.md §2. ;;;; ;;;; An unhandled error used to kill the program. Here it stops instead, on the ;;;; frame that erred with nothing unwound, and waits for someone to pick a ;;;; restart. Two of them, and the run takes a different one each time, so a ;;;; break loop that always resumed the same way could not pass. (import agent "vendor:agent") (defstruct Missing [id i32]) (defn fetch [n i32] i32 (restart-case (do (error (Missing {:id n})) 0) (use-placeholder [] -1) (retry [] 7))) (defn main [] i32 (agent/start "/tmp/flan-break.sock") (print-i64 (i64 (fetch 1))) (newline) (print-i64 (i64 (fetch 2))) (newline) 0)