summaryrefslogtreecommitdiff
path: root/module/system/base/compile.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/system/base/compile.scm')
-rw-r--r--module/system/base/compile.scm12
1 files changed, 3 insertions, 9 deletions
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index 4f1546025..4cc04cd03 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -140,15 +140,9 @@
(error "language has no #:read-file" lang))))
(define (compile-passes from to opts)
- (let lp ((langs (or (lookup-compilation-order from to)
- (error "no way to compile" (language-name from)
- "to" (language-name to))))
- (out '()))
- (if (null? (cdr langs))
- (reverse! out)
- (lp (cdr langs)
- (cons (assq-ref (language-compilers (car langs)) (cadr langs))
- out)))))
+ (map cdr
+ (or (lookup-compilation-order from to)
+ (error "no way to compile" from "to" to))))
(define (compile-fold passes exp env opts)
(if (null? passes)