; NEGATIVE FIXTURE. The LLM-natural mistake: a two-binder loop
; (acc, i) but the author writes `(recur (app + acc i))` forgetting
; to also advance `i` — passes 1 arg for 2 binders.
; Expected: `ail check` exits 1 with code recur-arity-mismatch.
(module loop_recur_3b_recur_arity
  (fn sum_to
    (type (fn-type (params (own (con Int))) (ret (own (con Int)))))
    (params n)
    (body
      (loop (acc (con Int) 0) (i (con Int) 1)
        (if (app gt i n)
            acc
            (recur (app + acc i))))))
  (fn main
    (type (fn-type (params) (ret (own (con Unit))) (effects IO)))
    (params)
    (body (app print (app sum_to 10)))))
