[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
string=? in (ice-9 syncase) requires a string argument
From: |
Dale P. Smith |
Subject: |
string=? in (ice-9 syncase) requires a string argument |
Date: |
Sat, 28 Oct 2000 16:14:45 -0400 |
It appears that string=? now requires a string argument (Imagine
that!) which causes the syncase module to hork. I'm not sure if
string=? should return #f on a non-string argument or if the code in
syncase.scm needs to verify a string before using string=?. Below is
a patch that adds test before using string=? It seems to work for me.
-Dale
address@hidden:~/src/guile$ guile
guile> (use-modules (ice-9 syncase))
Backtrace:
12 (or (try-module-linked name) (try-module-autoload name) ...)
13* [try-module-autoload (ice-9 syncase)]
14 (let* (# # # #) (resolve-module dir-hint-module-name #f) (and # #))
...
15 (let ((didit #f)) (dynamic-wind (lambda () #) (lambda () #) ...) ...)
16* [dynamic-wind #<procedure ()> #<procedure ()> #<procedure ()>]
17* [#<procedure ()>]
18* (let ((full #)) (if full (begin # #)))
19 (if full (begin (save-module-excursion (lambda () #)) (set! didit #t)))
20 (begin (save-module-excursion (lambda () #)) (set! didit #t))
21* [save-module-excursion #<procedure ()>]
22 (let (# #) (dynamic-wind # thunk #))
23 [dynamic-wind #<procedure ()> #<procedure ()> #<procedure ()>]
24* [#<procedure ()>]
25* [primitive-load "/usr/local/share/guile/1.4.1/ice-9/syncase.scm"]
26* (define-public syncase sc-expand)
27 (begin (let # # #) (eval # #))
...
28 [eval ...
29* (if (and (pair? x) (string=? (car x) "noexpand")) (cadr x) (sc-expand x))
30* (and (pair? x) (string=? (car x) "noexpand"))
31 [string=? define-private "noexpand"]
/usr/local/share/guile/1.4.1/ice-9/syncase.scm:158:27: In procedure string=? in
expression (string=? (car x) "noexpand"):
/usr/local/share/guile/1.4.1/ice-9/syncase.scm:158:27: Wrong type argument in
position 1 (expecting STRINGP): define-private
ABORT: (wrong-type-arg)
guile>
Patch follows:
Index: syncase.scm
===================================================================
RCS file: /cvs/guile/guile-core/ice-9/syncase.scm,v
retrieving revision 1.16
diff -c -r1.16 syncase.scm
*** syncase.scm 2000/09/12 10:34:09 1.16
--- syncase.scm 2000/10/28 20:03:12
***************
*** 155,160 ****
--- 155,161 ----
(define-public (eval x environment)
(internal-eval (if (and (pair? x)
+ (string? (car x))
(string=? (car x) "noexpand"))
(cadr x)
(sc-expand x))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- string=? in (ice-9 syncase) requires a string argument,
Dale P. Smith <=