From: Alan Grover <awgrover@mail.msen.com>
Subject: srfi-17 generates "deprecated" warnings
Date: Wed, 16 Mar 2005 22:13:27 -0500 [thread overview]
Message-ID: <4238F5D7.2060801@mail.msen.com> (raw)
The exports in srfi/srfi-17.scm cause a "deprecated" warning. Attempting
to use ":re-export" in "define-modules" breaks "set!".
Reproducible: always
Severity: annoying
Guile 1.6.4
Linux xxxxx 2.6.5-7.145-default #1 Thu Jan 27 09:19:29 UTC 2005 i686
i686 i386 GNU/Linux
buildstamp = Tue Apr 6 01:50:48 UTC 2004
LIBS = -lqthreads -lpthread -lcrypt -lm
libguileinterface = 15:0:3
guileversion = 1.6.4
To Reproduce:
guile -c '(use-modules (srfi srfi-17)) (define x (list 1 2)) (set! (cdr
x) 3) (write x)(newline)'
"Some deprecated features have been used. Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information. Set it to "no" to suppress
this message."
Setting the environment variable as suggested causes a long list
starting with:
"Using `export' to re-export imported bindings is deprecated. Use
`re-export' instead.
(You just re-exported `setter' from `(srfi srfi-17)'.)
(You just re-exported `car' from `(srfi srfi-17)'.)
(You just re-exported `cdr' from `(srfi srfi-17)'.)
(You just re-exported `caar' from `(srfi srfi-17)'.)
..."
Attempting to use ":re-export" in "define-modules" causes "set!" to break:
ERROR: In procedure setter:
ERROR: Wrong type argument in position 1: #<primitive-procedure cdr>
Moving the exports to the end of the file works:
(this isn't supposed to be different from using ":export" in
"define-modules")
-- orig/srfi-17.scm
+++ mod/srfi-17.scm
@@ -68,13 +68,8 @@
;;; Code:
(define-module (srfi srfi-17)
- :export (getter-with-setter
- setter
- ;; redefined standard procedures
- car cdr caar cadr cdar cddr caaar caadr cadar caddr cdaar
- cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr
- caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr
- cdddar cddddr string-ref vector-ref))
+ :export (getter-with-setter)
+ :re-export (setter))
(cond-expand-provide (current-module) '(srfi-17))
@@ -127,4 +122,10 @@
(define string-ref (getter-with-setter string-ref string-set!))
(define vector-ref (getter-with-setter vector-ref vector-set!))
+(export
+ ;; redefined standard procedures
+ car cdr caar cadr cdar cddr caaar caadr cadar caddr cdaar
+ cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr
+ caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr
+ cdddar cddddr string-ref vector-ref)
;;; srfi-17.scm ends here
--
Alan Grover
awgrover@mail.msen.com
+1.734.476.0969
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
next reply other threads:[~2005-03-17 3:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-17 3:13 Alan Grover [this message]
2005-03-17 21:22 ` srfi-17 generates "deprecated" warnings Kevin Ryde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4238F5D7.2060801@mail.msen.com \
--to=awgrover@mail.msen.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).