From 11378b73df276609ec950c4225b0ef526201e73f Mon Sep 17 00:00:00 2001 From: Ian Price Date: Mon, 28 Aug 2017 13:43:01 +0100 Subject: [PATCH] Create stub module forms for dependecies * module/scripts/jslink.scm: Module files need a module form, or functions like resolve-module won't work correctly. --- module/scripts/jslink.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/module/scripts/jslink.scm b/module/scripts/jslink.scm index 890c1729a..d5cdcef72 100644 --- a/module/scripts/jslink.scm +++ b/module/scripts/jslink.scm @@ -1,6 +1,7 @@ (define-module (scripts jslink) #:use-module (system base compile) #:use-module (system base language) + #:use-module (language javascript) #:use-module (srfi srfi-1) #:use-module (srfi srfi-37) #:use-module (ice-9 format) @@ -20,9 +21,9 @@ (define boot-dependencies '(("ice-9/posix" . #f) - ("ice-9/ports" . #f) - ("ice-9/threads" . #f) - ("srfi/srfi-4" . #f) + ("ice-9/ports" . (ice-9 ports)) + ("ice-9/threads" . (ice-9 threads)) + ("srfi/srfi-4" . (srfi srfi-4)) ("ice-9/deprecated" . #t) ("ice-9/boot-9" . #t) @@ -137,6 +138,11 @@ Report bugs to <~A>.~%" (format #t "boot_modules[~s] =\n" path) (cond ((string? file) (compile-dependency file)) + ((list? file) + (print-statement (compile `(define-module ,file) + #:from 'scheme #:to 'javascript) + (current-output-port)) + (newline)) (file (compile-dependency (%search-load-path path))) (else (format #t "function (cont) { return cont(scheme.UNDEFINED); };")))