flan/test/programs/generic-runaway.flan

11 lines
479 B
Plaintext

;;;; A generic that instantiates itself at a larger type every time.
;;;;
;;;; (grow [x x]) asks for a copy at [t], which asks for one at [[t]],
;;;; forever. Before the refusal this did not fail, it *hung*, and since
;;;; Session.eval runs the same code the thing that hung was C-c C-c with the
;;;; dev daemon wedged behind it. The refusal names the chain of
;;;; instantiations rather than a depth it gave up at.
(defn grow [x $t] () (grow [x x]))
(defn main [] () (grow 1))