1 ;;;; Copyright (C) 2003, 2005, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
3 ;;;; This library is free software; you can redistribute it and/or
4 ;;;; modify it under the terms of the GNU Lesser General Public
5 ;;;; License as published by the Free Software Foundation; either
6 ;;;; version 3 of the License, or (at your option) any later version.
8 ;;;; This library is distributed in the hope that it will be useful,
9 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ;;;; Lesser General Public License for more details.
13 ;;;; You should have received a copy of the GNU Lesser General Public
14 ;;;; License along with this library; if not, write to the Free Software
15 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 (define-module (ice-9 deprecated)
19 #:export (substring-move-left! substring-move-right!
20 dynamic-maybe-call dynamic-maybe-link
21 try-module-linked try-module-dynamic-link
22 list* feature? eval-case unmemoize-expr
53 transform-usage-lambda
56 assert-repl-print-unspecified
61 pre-unwind-handler-dispatch
62 default-pre-unwind-handler
71 process-define-module))
74 ;;;; Deprecated definitions.
76 (define substring-move-left!
78 (issue-deprecation-warning
79 "`substring-move-left!' is deprecated. Use `substring-move!' instead.")
80 (apply substring-move! args)))
81 (define substring-move-right!
83 (issue-deprecation-warning
84 "`substring-move-right!' is deprecated. Use `substring-move!' instead.")
85 (apply substring-move! args)))
89 ;; This method of dynamically linking Guile Extensions is deprecated.
90 ;; Use `load-extension' explicitly from Scheme code instead.
92 (define (split-c-module-name str)
96 (end (string-length str)))
99 (reverse (cons (string->symbol (substring str start pos)) rev)))
100 ((eq? (string-ref str pos) #\space)
101 (loop (cons (string->symbol (substring str start pos)) rev)
106 (loop rev start (+ pos 1) end)))))
108 (define (convert-c-registered-modules dynobj)
109 (let ((res (map (lambda (c)
110 (list (split-c-module-name (car c)) (cdr c) dynobj))
111 (c-registered-modules))))
112 (c-clear-registered-modules)
115 (define registered-modules '())
117 (define (register-modules dynobj)
118 (set! registered-modules
119 (append! (convert-c-registered-modules dynobj)
120 registered-modules)))
122 (define (warn-autoload-deprecation modname)
123 (issue-deprecation-warning
124 "Autoloading of compiled code modules is deprecated."
125 "Write a Scheme file instead that uses `load-extension'.")
126 (issue-deprecation-warning
127 (simple-format #f "(You just autoloaded module ~S.)" modname)))
129 (define (init-dynamic-module modname)
130 ;; Register any linked modules which have been registered on the C level
131 (register-modules #f)
132 (or-map (lambda (modinfo)
133 (if (equal? (car modinfo) modname)
135 (warn-autoload-deprecation modname)
136 (set! registered-modules (delq! modinfo registered-modules))
137 (let ((mod (resolve-module modname #f)))
138 (save-module-excursion
140 (set-current-module mod)
141 (set-module-public-interface! mod mod)
142 (dynamic-call (cadr modinfo) (caddr modinfo))
148 (define (dynamic-maybe-call name dynobj)
149 (issue-deprecation-warning
150 "`dynamic-maybe-call' is deprecated. "
151 "Wrap `dynamic-call' in a `false-if-exception' yourself.")
152 (false-if-exception (dynamic-call name dynobj)))
155 (define (dynamic-maybe-link filename)
156 (issue-deprecation-warning
157 "`dynamic-maybe-link' is deprecated. "
158 "Wrap `dynamic-link' in a `false-if-exception' yourself.")
159 (false-if-exception (dynamic-link filename)))
161 (define (find-and-link-dynamic-module module-name)
162 (define (make-init-name mod-name)
163 (string-append "scm_init"
164 (list->string (map (lambda (c)
165 (if (or (char-alphabetic? c)
169 (string->list mod-name)))
172 ;; Put the subdirectory for this module in the car of SUBDIR-AND-LIBNAME,
173 ;; and the `libname' (the name of the module prepended by `lib') in the cdr
174 ;; field. For example, if MODULE-NAME is the list (inet tcp-ip udp), then
175 ;; SUBDIR-AND-LIBNAME will be the pair ("inet/tcp-ip" . "libudp").
176 (let ((subdir-and-libname
179 (if (null? (cdr syms))
180 (cons dirs (string-append "lib" (symbol->string (car syms))))
181 (loop (string-append dirs (symbol->string (car syms)) "/")
183 (init (make-init-name (apply string-append
188 (let ((subdir (car subdir-and-libname))
189 (libname (cdr subdir-and-libname)))
191 ;; Now look in each dir in %LOAD-PATH for `subdir/libfoo.la'. If that
192 ;; file exists, fetch the dlname from that file and attempt to link
193 ;; against it. If `subdir/libfoo.la' does not exist, or does not seem
194 ;; to name any shared library, look for `subdir/libfoo.so' instead and
195 ;; link against that.
196 (let check-dirs ((dir-list %load-path))
199 (let* ((dir (in-vicinity (car dir-list) subdir))
201 (or (try-using-libtool-name dir libname)
202 (try-using-sharlib-name dir libname))))
203 (if (and sharlib-full (file-exists? sharlib-full))
204 (link-dynamic-module sharlib-full init)
205 (check-dirs (cdr dir-list)))))))))
207 (define (try-using-libtool-name libdir libname)
208 (let ((libtool-filename (in-vicinity libdir
209 (string-append libname ".la"))))
210 (and (file-exists? libtool-filename)
213 (define (try-using-sharlib-name libdir libname)
214 (in-vicinity libdir (string-append libname ".so")))
216 (define (link-dynamic-module filename initname)
217 ;; Register any linked modules which have been registered on the C level
218 (register-modules #f)
219 (let ((dynobj (dynamic-link filename)))
220 (dynamic-call initname dynobj)
221 (register-modules dynobj)))
223 (define (try-module-linked module-name)
224 (issue-deprecation-warning
225 "`try-module-linked' is deprecated."
226 "See the manual for how more on C extensions.")
227 (init-dynamic-module module-name))
229 (define (try-module-dynamic-link module-name)
230 (issue-deprecation-warning
231 "`try-module-dynamic-link' is deprecated."
232 "See the manual for how more on C extensions.")
233 (and (find-and-link-dynamic-module module-name)
234 (init-dynamic-module module-name)))
237 (define (list* . args)
238 (issue-deprecation-warning "'list*' is deprecated. Use 'cons*' instead.")
241 (define (feature? sym)
242 (issue-deprecation-warning
243 "`feature?' is deprecated. Use `provided?' instead.")
246 (define-macro (eval-case . clauses)
247 (issue-deprecation-warning
248 "`eval-case' is deprecated. Use `eval-when' instead.")
249 ;; Practically speaking, eval-case only had load-toplevel and else as
252 ((assoc-ref clauses '(load-toplevel))
254 ;; the *unspecified so that non-toplevel definitions will be
256 `(begin *unspecified* . ,exps)))
257 ((assoc-ref clauses 'else)
259 `(begin *unspecified* . ,exps)))
263 ;; The strange prototype system for uniform arrays has been
268 (issue-deprecation-warning
269 "The `#y' bytevector syntax is deprecated. Use `#s8' instead.")
270 (let ((x (read port)))
272 ((list? x) (list->s8vector x))
273 (else (error "#y needs to be followed by a list" x))))))
275 (define (unmemoize-expr . args)
276 (issue-deprecation-warning
277 "`unmemoize-expr' is deprecated. Use `unmemoize-expression' instead.")
278 (apply unmemoize-expression args))
281 (issue-deprecation-warning
282 "`$asinh' is deprecated. Use `asinh' instead.")
285 (issue-deprecation-warning
286 "`$acosh' is deprecated. Use `acosh' instead.")
289 (issue-deprecation-warning
290 "`$atanh' is deprecated. Use `atanh' instead.")
293 (issue-deprecation-warning
294 "`$sqrt' is deprecated. Use `sqrt' instead.")
297 (issue-deprecation-warning
298 "`$abs' is deprecated. Use `abs' instead.")
301 (issue-deprecation-warning
302 "`$exp' is deprecated. Use `exp' instead.")
304 (define ($expt z1 z2)
305 (issue-deprecation-warning
306 "`$expt' is deprecated. Use `expt' instead.")
309 (issue-deprecation-warning
310 "`$log' is deprecated. Use `log' instead.")
313 (issue-deprecation-warning
314 "`$sin' is deprecated. Use `sin' instead.")
317 (issue-deprecation-warning
318 "`$cos' is deprecated. Use `cos' instead.")
321 (issue-deprecation-warning
322 "`$tan' is deprecated. Use `tan' instead.")
325 (issue-deprecation-warning
326 "`$asin' is deprecated. Use `asin' instead.")
329 (issue-deprecation-warning
330 "`$acos' is deprecated. Use `acos' instead.")
333 (issue-deprecation-warning
334 "`$atan' is deprecated. Use `atan' instead.")
337 (issue-deprecation-warning
338 "`$sinh' is deprecated. Use `sinh' instead.")
341 (issue-deprecation-warning
342 "`$cosh' is deprecated. Use `cosh' instead.")
345 (issue-deprecation-warning
346 "`$tanh' is deprecated. Use `tanh' instead.")
350 (issue-deprecation-warning
351 "`closure?' is deprecated. Use `procedure?' instead.")
356 ;;; @bind is used by the old elisp code as a dynamic scoping mechanism.
357 ;;; Please let the Guile developers know if you are using this macro.
361 (define (bound-member id ids)
362 (cond ((null? ids) #f)
363 ((bound-identifier=? id (car ids)) #t)
364 ((bound-member (car ids) (cdr ids)))))
366 (issue-deprecation-warning
367 "`@bind' is deprecated. Use `with-fluids' instead.")
371 #'(let () b0 b1 ...))
372 ((_ ((id val) ...) b0 b1 ...)
373 (and-map identifier? #'(id ...))
374 (if (let lp ((ids #'(id ...)))
375 (cond ((null? ids) #f)
376 ((bound-member (car ids) (cdr ids)) #t)
377 (else (lp (cdr ids)))))
378 (syntax-violation '@bind "duplicate bound identifier" x)
379 (with-syntax (((old-v ...) (generate-temporaries #'(id ...)))
380 ((v ...) (generate-temporaries #'(id ...))))
381 #'(let ((old-v id) ...
386 (lambda () b0 b1 ...)
388 (set! id old-v) ...)))))))))
390 ;; There are deprecated definitions for module-ref-submodule and
391 ;; module-define-submodule! in boot-9.scm.
393 ;; Define (%app) and (%app modules), and have (app) alias (%app). This
394 ;; side-effects the-root-module, both to the submodules table and (through
395 ;; module-define-submodule! above) the obarray.
397 (let ((%app (make-module 31)))
398 (set-module-name! %app '(%app))
399 (module-define-submodule! the-root-module '%app %app)
400 (module-define-submodule! the-root-module 'app %app)
401 (module-define-submodule! %app 'modules (resolve-module '() #f)))
403 ;; Allow code that poked %module-public-interface to keep on working.
405 (set! module-public-interface
406 (let ((getter module-public-interface))
410 ((and=> (module-local-variable mod '%module-public-interface)
413 (issue-deprecation-warning
414 "Setting a module's public interface via munging %module-public-interface is
415 deprecated. Use set-module-public-interface! instead.")
416 (set-module-public-interface! mod iface)
420 (set! set-module-public-interface!
421 (let ((setter set-module-public-interface!))
424 (module-define! mod '%module-public-interface iface))))
426 (define (bad-throw key . args)
427 (issue-deprecation-warning
428 "`bad-throw' in the default environment is deprecated.
429 Find it in the `(ice-9 scm-style-repl)' module instead.")
430 (apply (@ (ice-9 scm-style-repl) bad-throw) key args))
432 (define (error-catching-loop thunk)
433 (issue-deprecation-warning
434 "`error-catching-loop' in the default environment is deprecated.
435 Find it in the `(ice-9 scm-style-repl)' module instead.")
436 ((@ (ice-9 scm-style-repl) error-catching-loop) thunk))
438 (define (error-catching-repl r e p)
439 (issue-deprecation-warning
440 "`error-catching-repl' in the default environment is deprecated.
441 Find it in the `(ice-9 scm-style-repl)' module instead.")
442 ((@ (ice-9 scm-style-repl) error-catching-repl) r e p))
444 (define (scm-style-repl)
445 (issue-deprecation-warning
446 "`scm-style-repl' in the default environment is deprecated.
447 Find it in the `(ice-9 scm-style-repl)' module instead, or
448 better yet, use the repl from `(system repl repl)'.")
449 ((@ (ice-9 scm-style-repl) scm-style-repl)))
452 ;;; Apply-to-args had the following comment attached to it in boot-9, but it's
453 ;;; wrong-headed: in the mentioned case, a point should either be a record or
456 ;;; apply-to-args is functionally redundant with apply and, worse,
457 ;;; is less general than apply since it only takes two arguments.
459 ;;; On the other hand, apply-to-args is a syntacticly convenient way to
460 ;;; perform binding in many circumstances when the "let" family of
461 ;;; of forms don't cut it. E.g.:
463 ;;; (apply-to-args (return-3d-mouse-coords)
468 (define (apply-to-args args fn)
469 (issue-deprecation-warning
470 "`apply-to-args' is deprecated. Include a local copy in your program.")
473 (define (has-suffix? str suffix)
474 (issue-deprecation-warning
475 "`has-suffix?' is deprecated. Use `string-suffix?' instead (args reversed).")
476 (string-suffix? suffix str))
478 (define scheme-file-suffix
480 (issue-deprecation-warning
481 "`scheme-file-suffix' is deprecated. Use `%load-extensions' instead.")
486 ;;; {Command Line Options}
489 (define (get-option argv kw-opts kw-args return)
490 (issue-deprecation-warning
491 "`get-option' is deprecated. Use `(ice-9 getopt-long)' instead.")
496 ((or (not (eq? #\- (string-ref (car argv) 0)))
497 (eq? (string-length (car argv)) 1))
498 (return 'normal-arg (car argv) (cdr argv)))
500 ((eq? #\- (string-ref (car argv) 1))
501 (let* ((kw-arg-pos (or (string-index (car argv) #\=)
502 (string-length (car argv))))
503 (kw (symbol->keyword (substring (car argv) 2 kw-arg-pos)))
504 (kw-opt? (member kw kw-opts))
505 (kw-arg? (member kw kw-args))
506 (arg (or (and (not (eq? kw-arg-pos (string-length (car argv))))
507 (substring (car argv)
509 (string-length (car argv))))
511 (begin (set! argv (cdr argv)) (car argv))))))
512 (if (or kw-opt? kw-arg?)
513 (return kw arg (cdr argv))
514 (return 'usage-error kw (cdr argv)))))
517 (let* ((char (substring (car argv) 1 2))
518 (kw (symbol->keyword char)))
522 (let* ((rest-car (substring (car argv) 2 (string-length (car argv))))
523 (new-argv (if (= 0 (string-length rest-car))
525 (cons (string-append "-" rest-car) (cdr argv)))))
526 (return kw #f new-argv)))
529 (let* ((rest-car (substring (car argv) 2 (string-length (car argv))))
530 (arg (if (= 0 (string-length rest-car))
533 (new-argv (if (= 0 (string-length rest-car))
536 (return kw arg new-argv)))
538 (else (return 'usage-error kw argv)))))))
540 (define (for-next-option proc argv kw-opts kw-args)
541 (issue-deprecation-warning
542 "`for-next-option' is deprecated. Use `(ice-9 getopt-long)' instead.")
543 (let loop ((argv argv))
544 (get-option argv kw-opts kw-args
545 (lambda (opt opt-arg argv)
546 (and opt (proc opt opt-arg argv loop))))))
548 (define (display-usage-report kw-desc)
549 (issue-deprecation-warning
550 "`display-usage-report' is deprecated. Use `(ice-9 getopt-long)' instead.")
553 (or (eq? (car kw) #t)
556 (help (cadr opt-desc))
557 (opts (car opt-desc))
558 (opts-proper (if (string? (car opts)) (cdr opts) opts))
559 (arg-name (if (string? (car opts))
560 (string-append "<" (car opts) ">")
562 (left-part (string-append
563 (with-output-to-string
565 (map (lambda (x) (display (keyword->symbol x)) (display " "))
568 (middle-part (if (and (< (string-length left-part) 30)
569 (< (string-length help) 40))
570 (make-string (- 30 (string-length left-part)) #\ )
573 (display middle-part)
578 (define (transform-usage-lambda cases)
579 (issue-deprecation-warning
580 "`display-usage-report' is deprecated. Use `(ice-9 getopt-long)' instead.")
581 (let* ((raw-usage (delq! 'else (map car cases)))
582 (usage-sans-specials (map (lambda (x)
583 (or (and (not (list? x)) x)
584 (and (symbol? (car x)) #t)
585 (and (boolean? (car x)) #t)
588 (usage-desc (delq! #t usage-sans-specials))
589 (kw-desc (map car usage-desc))
590 (kw-opts (apply append (map (lambda (x) (and (not (string? (car x))) x)) kw-desc)))
591 (kw-args (apply append (map (lambda (x) (and (string? (car x)) (cdr x))) kw-desc)))
592 (transmogrified-cases (map (lambda (case)
593 (cons (let ((opts (car case)))
594 (if (or (boolean? opts) (eq? 'else opts))
597 ((symbol? (car opts)) opts)
598 ((boolean? (car opts)) opts)
599 ((string? (caar opts)) (cdar opts))
603 `(let ((%display-usage (lambda () (display-usage-report ',usage-desc))))
605 (let %next-arg ((%argv %argv))
609 (lambda (%opt %arg %new-argv)
611 ,@ transmogrified-cases))))))))
617 ;;; Similar to `begin' but returns a list of the results of all constituent
618 ;;; forms instead of the result of the last form.
621 (define-syntax collect
623 (issue-deprecation-warning
624 "`collect' is deprecated. Define it yourself.")
629 (cons val (collect x* ...)))))))
634 (define (assert-repl-silence v)
635 (issue-deprecation-warning
636 "`assert-repl-silence' has moved to `(ice-9 scm-style-repl)'.")
637 ((@ (ice-9 scm-style-repl) assert-repl-silence) v))
639 (define (assert-repl-print-unspecified v)
640 (issue-deprecation-warning
641 "`assert-repl-print-unspecified' has moved to `(ice-9 scm-style-repl)'.")
642 ((@ (ice-9 scm-style-repl) assert-repl-print-unspecified) v))
644 (define (assert-repl-verbosity v)
645 (issue-deprecation-warning
646 "`assert-repl-verbosity' has moved to `(ice-9 scm-style-repl)'.")
647 ((@ (ice-9 scm-style-repl) assert-repl-verbosity) v))
649 (define (set-repl-prompt! v)
650 (issue-deprecation-warning
651 "`set-repl-prompt!' is deprecated. Use `repl-default-prompt-set!' from
652 the `(system repl common)' module.")
653 ;; Avoid @, as when bootstrapping it will cause the (system repl common)
654 ;; module to be loaded at expansion time, which eventually loads srfi-1, but
655 ;; that fails due to an unbuilt supporting lib... grrrrrrrrr.
656 ((module-ref (resolve-interface '(system repl common))
657 'repl-default-prompt-set!)
660 (define (set-batch-mode?! arg)
663 (issue-deprecation-warning
664 "`set-batch-mode?!' is deprecated. Use `ensure-batch-mode!' instead.")
665 (ensure-batch-mode!))
667 (issue-deprecation-warning
668 "`set-batch-mode?!' with an argument of `#f' is deprecated. Use the
669 `*repl-stack*' fluid instead.")
672 (define (repl read evaler print)
673 (issue-deprecation-warning
674 "`repl' is deprecated. Define it yourself.")
675 (let loop ((source (read (current-input-port))))
676 (print (evaler source))
677 (loop (read (current-input-port)))))
679 (define (pre-unwind-handler-dispatch key . args)
680 (issue-deprecation-warning
681 "`pre-unwind-handler-dispatch' is deprecated. Use
682 `default-pre-unwind-handler' from `(ice-9 scm-style-repl)' directly.")
683 (apply (@ (ice-9 scm-style-repl) default-pre-unwind-handler) key args))
685 (define (default-pre-unwind-handler key . args)
686 (issue-deprecation-warning
687 "`default-pre-unwind-handler' is deprecated. Use it from
688 `(ice-9 scm-style-repl)' if you need it.")
689 (apply (@ (ice-9 scm-style-repl) default-pre-unwind-handler) key args))
691 (define (handle-system-error key . args)
692 (issue-deprecation-warning
693 "`handle-system-error' is deprecated. Use it from
694 `(ice-9 scm-style-repl)' if you need it.")
695 (apply (@ (ice-9 scm-style-repl) handle-system-error) key args))
697 (define-syntax stack-saved?
698 (make-variable-transformer
700 (issue-deprecation-warning
701 "`stack-saved?' is deprecated. Use it from
702 `(ice-9 save-stack)' if you need it.")
703 (syntax-case x (set!)
706 #'(set! (@ (ice-9 save-stack) stack-saved?) val))
709 #'(@ (ice-9 save-stack) stack-saved?))))))
711 (define-syntax the-last-stack
713 (issue-deprecation-warning
714 "`the-last-stack' is deprecated. Use it from `(ice-9 save-stack)'
719 #'(@ (ice-9 save-stack) the-last-stack)))))
721 (define (save-stack . args)
722 (issue-deprecation-warning
723 "`save-stack' is deprecated. Use it from `(ice-9 save-stack)' if you need
725 (apply (@ (ice-9 save-stack) save-stack) args))
727 (define (named-module-use! user usee)
728 (issue-deprecation-warning
729 "`named-module-use!' is deprecated. Define it yourself if you need it.")
730 (module-use! (resolve-module user) (resolve-interface usee)))
733 (issue-deprecation-warning
734 "`top-repl' has moved to the `(ice-9 top-repl)' module.")
735 ((module-ref (resolve-module '(ice-9 top-repl)) 'top-repl)))
738 (let ((debug-enable debug-enable))
740 (if (memq 'debug opts)
742 (issue-deprecation-warning
743 "`(debug-enable 'debug)' is obsolete and has no effect."
744 "Remove it from your code.")
745 (apply debug-enable (delq 'debug opts)))
746 (apply debug-enable opts)))))
748 (define (turn-on-debugging)
749 (issue-deprecation-warning
750 "`(turn-on-debugging)' is obsolete and usually has no effect."
751 "Debugging capabilities are present by default.")
752 (debug-enable 'backtrace)
753 (read-enable 'positions))
755 (define (read-hash-procedures-warning)
756 (issue-deprecation-warning
757 "`read-hash-procedures' is deprecated."
758 "Use the fluid `%read-hash-procedures' instead."))
760 (define-syntax read-hash-procedures
763 (begin (read-hash-procedures-warning)
764 (fluid-ref %read-hash-procedures)))
766 (begin (read-hash-procedures-warning)
767 (fluid-set! %read-hash-procedures expr)))))
769 (define (process-define-module args)
771 (error "missing argument to define-module keyword" kw))
772 (define (unrecognized arg)
773 (error "unrecognized define-module argument" arg))
775 (issue-deprecation-warning
776 "`process-define-module' is deprecated. Use `define-module*' instead.")
778 (let ((name (car args))
785 (let loop ((kws (cdr args))
793 #:filename filename #:pure pure? #:version version
794 #:duplicates duplicates #:transformer transformer
795 #:imports (reverse! imports)
797 #:re-exports re-exports
798 #:replacements replacements
799 #:autoloads autoloads)
801 ((#:use-module #:use-syntax)
802 (or (pair? (cdr kws))
805 ((equal? (cadr kws) '(ice-9 syncase))
806 (issue-deprecation-warning
807 "(ice-9 syncase) is deprecated. Support for syntax-case is now in Guile core.")
809 imports exports re-exports replacements autoloads))
811 (let ((iface-spec (cadr kws)))
812 (if (eq? (car kws) #:use-syntax)
813 (set! transformer iface-spec))
815 (cons iface-spec imports) exports re-exports
816 replacements autoloads)))))
818 (or (and (pair? (cdr kws)) (pair? (cddr kws)))
820 (let ((name (cadr kws))
821 (bindings (caddr kws)))
823 imports exports re-exports
824 replacements (cons* name bindings autoloads))))
829 imports exports re-exports replacements autoloads))
833 imports exports re-exports replacements autoloads))
835 (or (pair? (cdr kws))
837 (set! version (cadr kws))
839 imports exports re-exports replacements autoloads))
841 (if (not (pair? (cdr kws)))
843 (set! duplicates (cadr kws))
845 imports exports re-exports replacements autoloads))
846 ((#:export #:export-syntax)
847 (or (pair? (cdr kws))
850 imports (append exports (cadr kws)) re-exports
851 replacements autoloads))
852 ((#:re-export #:re-export-syntax)
853 (or (pair? (cdr kws))
856 imports exports (append re-exports (cadr kws))
857 replacements autoloads))
858 ((#:replace #:replace-syntax)
859 (or (pair? (cdr kws))
862 imports exports re-exports
863 (append replacements (cadr kws)) autoloads))
865 (or (pair? (cdr kws))
867 (set! filename (cadr kws))
869 imports exports re-exports replacements autoloads))
871 (unrecognized kws)))))))