apl: apl-run-file path → array (+4 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 56s
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:
@@ -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))))
|
||||
|
||||
Reference in New Issue
Block a user