diff options
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/compiler.tl | 16 | ||||
-rw-r--r-- | stdlib/doc-syms.tl | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl index 62893e94..ea8124e8 100644 --- a/stdlib/compiler.tl +++ b/stdlib/compiler.tl @@ -2425,6 +2425,22 @@ (list in-stream out-stream out-path))) +(defun clean-file (path) + (let* ((parent *load-path*) + (path (if (and parent (pure-rel-path-p path)) + (path-cat (dir-name parent) path) + path))) + (match-case path + (@(or `@base.tlo` + `@base.tlo.gz`) + (ignore base) + (remove-path path)) + (@(or `@base.txr` + `@base.tl` + `@base`) + (or (remove-path `@base.tlo` nil) + (remove-path `@base.tlo.gz` nil)))))) + (defun list-from-vm-desc (vd) (list (sys:vm-desc-nlevels vd) (sys:vm-desc-nregs vd) diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl index a3d5434d..49e7cb9f 100644 --- a/stdlib/doc-syms.tl +++ b/stdlib/doc-syms.tl @@ -329,6 +329,7 @@ ("chr-xdigit" "N-021C89F4") ("chrp" "N-02C6CEED") ("clamp" "N-03B940D4") + ("clean-file" "N-001939D4") ("clear-cflags" "N-02061924") ("clear-dirty" "N-03AB857D") ("clear-error" "D-000C") |