(define-syntax-rule (add-to-load-path elt)
"Add ELT to Guile's load path, at compile-time and at run-time."
- (eval-when (compile load eval)
+ (eval-when (expand load eval)
(set! %load-path (cons elt %load-path))))
(define %load-verbosely #f)
(interface options)
(interface)))
(define-syntax-rule (option-set! opt val)
- (eval-when (eval load compile expand)
+ (eval-when (expand load eval)
(options (append (options) (list 'opt val)))))))))
(define-option-interface
;; Return a list of expressions that evaluate to the appropriate
;; arguments for resolve-interface according to SPEC.
-(eval-when (compile)
+(eval-when (expand)
(if (memq 'prefix (read-options))
(error "boot-9 must be compiled with #:kw, not :kw")))
(filename (let ((f (assq-ref (or (syntax-source x) '())
'filename)))
(and (string? f) f))))
- #'(eval-when (eval load compile expand)
+ #'(eval-when (expand load eval)
(let ((m (define-module* '(name name* ...)
#:filename filename quoted-arg ...)))
(set-current-module m)
(syntax-case x ()
((_ spec ...)
(with-syntax (((quoted-args ...) (quotify #'(spec ...))))
- #'(eval-when (eval load compile expand)
+ #'(eval-when (expand load eval)
(process-use-modules (list quoted-args ...))
*unspecified*))))))
(define-syntax-rule (use-syntax spec ...)
(begin
- (eval-when (eval load compile expand)
+ (eval-when (expand load eval)
(issue-deprecation-warning
"`use-syntax' is deprecated. Please contact guile-devel for more info."))
(use-modules spec ...)))
names)))
(define-syntax-rule (export name ...)
- (eval-when (eval load compile expand)
+ (eval-when (expand load eval)
(call-with-deferred-observers
(lambda ()
(module-export! (current-module) '(name ...))))))
(define-syntax-rule (re-export name ...)
- (eval-when (eval load compile expand)
+ (eval-when (expand load eval)
(call-with-deferred-observers
(lambda ()
(module-re-export! (current-module) '(name ...))))))
(define-syntax-rule (export! name ...)
- (eval-when (eval load compile expand)
+ (eval-when (expand load eval)
(call-with-deferred-observers
(lambda ()
(module-replace! (current-module) '(name ...))))))
locale-yes-regexp locale-no-regexp))
-(eval-when (eval load compile)
+(eval-when (expand load eval)
(load-extension (string-append "libguile-" (effective-version))
"scm_init_i18n"))
poll-set-remove!
poll))
-(eval-when (eval load compile)
+(eval-when (expand load eval)
(load-extension (string-append "libguile-" (effective-version))
"scm_init_poll"))
:export (port/pid-table open-pipe* open-pipe close-pipe open-input-pipe
open-output-pipe open-input-output-pipe))
-(eval-when (load eval compile)
+(eval-when (expand load eval)
(load-extension (string-append "libguile-" (effective-version))
"scm_init_popen"))
(syntax-case stx ()
((_ import-set ...)
(with-syntax (((library-reference ...) (map strip-for #'(import-set ...))))
- #'(eval-when (eval load compile expand)
+ #'(eval-when (expand load eval)
(let ((iface (resolve-r6rs-interface 'library-reference)))
(call-with-deferred-observers
(lambda ()
(define *goops-module* (current-module))
;; First initialize the builtin part of GOOPS
-(eval-when (eval load compile)
+(eval-when (expand load eval)
(%init-goops-builtins))
-(eval-when (eval load compile)
+(eval-when (expand load eval)
(use-modules ((language tree-il primitives) :select (add-interesting-primitive!)))
(add-interesting-primitive! 'class-of)
(define (@slot-ref o n)
(oop goops compile))
\f
-(eval-when (eval load compile)
+(eval-when (expand load eval)
(define min-fixnum (- (expt 2 29)))
(define max-fixnum (- (expt 2 29) 1)))
;; the idea is to compile the index into the procedure, for fastest
;; lookup. Also, @slot-ref and @slot-set! have their own bytecodes.
-(eval-when (eval load compile)
+(eval-when (expand load eval)
(define num-standard-pre-cache 20))
(define-macro (define-standard-accessor-method form . body)
;; There are circularities here; you can't import (oop goops compile)
;; before (oop goops). So when compiling, make sure that things are
;; kosher.
-(eval-when (compile) (resolve-module '(oop goops)))
+(eval-when (expand) (resolve-module '(oop goops)))
(define-module (oop goops compile)
:use-module (oop goops)
;; There are circularities here; you can't import (oop goops compile)
;; before (oop goops). So when compiling, make sure that things are
;; kosher.
-(eval-when (compile) (resolve-module '(oop goops)))
+(eval-when (expand) (resolve-module '(oop goops)))
(define-module (oop goops dispatch)
#:use-module (oop goops)
\f
;; Change the keyword syntax both at compile time and run time; the latter is
;; useful at the REPL.
-(eval-when (compile load)
+(eval-when (expand load eval)
(read-set! keywords 'postfix))
(define (keyword->string k)
define-wrapped-pointer-type))
-(eval-when (load eval compile)
+(eval-when (expand load eval)
(load-extension (string-append "libguile-" (effective-version))
"scm_init_foreign"))
;; Why? Well, because syntax-case defines `include', and carps about its
;; wrong usage below...
-(eval-when (eval load compile)
+(eval-when (expand load eval)
(define (include exp lp command type formals args accum)
(list* "\n"
(list-intersperse