* srfi-17 generates "deprecated" warnings
@ 2005-03-17 3:13 Alan Grover
2005-03-17 21:22 ` Kevin Ryde
0 siblings, 1 reply; 2+ messages in thread
From: Alan Grover @ 2005-03-17 3:13 UTC (permalink / 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: srfi-17 generates "deprecated" warnings
2005-03-17 3:13 srfi-17 generates "deprecated" warnings Alan Grover
@ 2005-03-17 21:22 ` Kevin Ryde
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Ryde @ 2005-03-17 21:22 UTC (permalink / raw)
Cc: bug-guile
Alan Grover <awgrover@mail.msen.com> writes:
>
> + :re-export (setter))
I think that has to be an export at the end, since it's a redefinition
of a core procedure.
> +(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)
Thanks, I made that change.
_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-17 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-17 3:13 srfi-17 generates "deprecated" warnings Alan Grover
2005-03-17 21:22 ` Kevin Ryde
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).