cl: Phase 6 packages — defpackage/in-package + pkg:sym — 518/518 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 40s

cl-packages dict, cl-current-package, cl-package-sep? strips pkg:
prefix from symbol/function lookups. defpackage/in-package/export/
use-package/import/find-package/package-name dispatch. Package-
qualified calls like (cl:car ...) and (cl:mapcar ...) work.
4 package tests added to stdlib.sx.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-05 12:33:36 +00:00
parent 4f9da65b3d
commit 99f8ccb30e
5 changed files with 104 additions and 21 deletions

View File

@@ -260,6 +260,24 @@
(ev "(format nil \"(~{~A ~})\" (quote (1 2 3)))")
"(1 2 3 )")
;; ── packages ─────────────────────────────────────────────────────
(check "defpackage returns name"
(ev "(defpackage :my-pkg (:use :cl))")
"MY-PKG")
(check "in-package"
(ev "(progn (defpackage :test-pkg) (in-package :test-pkg) (package-name))")
"TEST-PKG")
(check "package-qualified function"
(ev "(cl:car (quote (1 2 3)))")
1)
(check "package-qualified function 2"
(ev "(cl:mapcar (function evenp) (quote (2 3 4)))")
(list true nil true))
;; ── summary ──────────────────────────────────────────────────────
(define stdlib-passed passed)