; NO-TERMINATION BOUNDARY fixture (loop-axis-covering sibling of
; loop_recur_5_event_loop_noterm.ail, which surfaced the orthogonal
; niladic-call obstacle). An LLM-natural shape: a "tick" event loop
; seeded from a start value that never exits (no non-recur branch).
; Per the loop-recur spec this MUST `ail check` AND `ail build`
; cleanly — AILang makes no termination claim. BUILD-ONLY: by
; design this binary never returns, so it is never executed.
(module loop_recur_5b_event_loop_noterm
  (fn run_forever
    (doc "Infinite event loop. Two binders: tick counter and a running parity flag. No branch ever exits via a non-recur term.")
    (type (fn-type (params (own (con Int))) (ret (own (con Int)))))
    (params start)
    (body
      (loop (tick (con Int) start) (parity (con Int) 0)
        (if (app eq (app % tick 2) 0)
            (recur (app + tick 1) 1)
            (recur (app + tick 1) 0)))))
  (fn main
    (type (fn-type (params) (ret (own (con Unit))) (effects IO)))
    (params)
    (body (app print (app run_forever 0)))))
