apl: apl-run-file path → array (+4 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 56s

Trivial wrapper: apl-run-file = apl-run ∘ file-read, where
file-read is built-in to OCaml SX.

Tests verify primes.apl, life.apl, quicksort.apl all parse
end-to-end (their last form is a :dfn AST).  Source-then-call
test confirms the loaded file's defined fn is callable, even
when the algorithm itself can't fully execute (primes' inline
⍵ rebinding still missing — :glyph-token, not :name-token).
This commit is contained in:
2026-05-07 22:48:21 +00:00
parent bcdd137d6f
commit bf782d9c49
3 changed files with 28 additions and 1 deletions

View File

@@ -551,3 +551,5 @@
(else (error "apl-resolve-dyadic: unknown fn-node tag"))))))
(define apl-run (fn (src) (apl-eval-ast (parse-apl src) {})))
(define apl-run-file (fn (path) (apl-run (file-read path))))