(module raw_buf_new_type_arg_intsize
  (fn main
    (doc "RED-pin fixture for #51 leg 1 (raw-buf F7). A `(new RawBuf (con Int) 3)` buffer used ONLY via `RawBuf.size` — its element type is never observed by a later get/set, so the only carrier of the element type is the author's explicit `(con Int)` type-arg on `new`. Today `(new T <type> <values>)` desugars to `(app T.new <values>)` and DROPS the leading NewArg::Type (crates/ailang-core/src/desugar.rs:1053), so the result's forall var `a` is unpinned and monomorphisation defaults it to Unit (crates/ailang-check/src/mono.rs free-fn-call arm; mirror crates/ailang-codegen/src/subst.rs). Codegen then mints `RawBuf_new__Unit`, which has no registered intercept (only Int/Float/Bool are in crates/ailang-codegen/src/intercepts.rs) and `ail build --alloc=rc` aborts: `intrinsic fn RawBuf_new__Unit has no registered intercept`. Expected post-fix: the explicit `(con Int)` is carried through monomorphisation so the buffer specialises to `RawBuf_new__Int`; build succeeds and the program prints 3 (the size).")
    (type (fn-type (params) (ret (own (con Unit))) (effects IO)))
    (params)
    (body
      (let b (new RawBuf (con Int) 3)
        (app print (app RawBuf.size b))))))
