(module int_to_str_drop_rc (fn main (doc "Iter hs.4: pin that `int_to_str` participates in RC discipline. Bind the heap-Str result to `s`, consume `s` once in `io/print_str`, let the binder drop at scope close. Under --alloc=rc with AILANG_RC_STATS=1 the atexit summary must report allocs == frees && live == 0 — the heap-Str slab allocated by str_alloc inside ailang_int_to_str rides the same rc_header + ailang_rc_dec path as any other RC value.") (type (fn-type (params) (ret (con Unit)) (effects IO))) (params) (body (let s (app int_to_str 42) (do io/print_str s)))))