From 6fe7509ef8abba4f978dcaf76b348ef36e17e100 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 18 May 2026 01:00:54 +0100 Subject: [PATCH] fix(resolve): seed `trunc` builtin in resolver context (#135) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `trunc` is a genuine runtime builtin (interp.ml:674, kernel_sublang builtin set) but was absent from the resolver's builtin-seed list while its siblings floor/ceil/round are present, so math.affine failed resolution with UndefinedVariable "trunc". Add `def "trunc"`. Verified on origin/main @651cc12: math.affine now passes the resolve stage (its remaining Int/Float TypeMismatch is a separate pre-existing math.affine typecheck issue, out of scope). Full stdlib sweep 11/8 → 11/8, zero regression. Refs #128 --- lib/resolve.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/resolve.ml b/lib/resolve.ml index 51c37abb..7344e5f1 100644 --- a/lib/resolve.ml +++ b/lib/resolve.ml @@ -64,6 +64,7 @@ let create_context () : context = (* Numeric coercions and math *) def "int"; def "float"; def "sqrt"; def "cbrt"; def "pow_float"; def "floor"; def "ceil"; def "round"; + def "trunc"; def "abs"; def "max"; def "min"; def "sin"; def "cos"; def "tan"; def "atan"; def "atan2"; def "exp"; def "log"; def "log10"; def "log2";