We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When an error is thrown within guard procedure.
Reported by Joo ChurlSoo. Here's a sample session exhibiting the bug.
gosh> (use gauche.parameter)
gosh> (define a (make-parameter 1 number->string)) (define b (make-parameter 2 number->string)) a gosh> b gosh> (list (a) (b)) ("1" "2") gosh> (parameterize ((a 10) (b 20) (a 30) (b 40)) (list (a) (b))) ("30" "40") gosh> (list (a) (b)) ("10" "20") gosh> (a 1) (b 2) "10" gosh> "20" gosh> (list (a) (b)) ("1" "2") gosh> (parameterize ((a 10) (b 20) (a 30) (b 'ab)) (list (a) (b))) *** ERROR: number required: ab Stack Trace:
0 (P L) [unknown location] 1 (^ () (set! S (P L)) (set! S (P L)) (set! S (P L)) (set! S (P L))) [unknown location] 2 (eval expr env) At line 179 of "c:\tilde\gauche\share\gauche-0.9\0.9.4\lib/gauche/interactive.scm" gosh> (list (a) (b)) ("30" "20") gosh> (let ((f (make-parameter 'a)) (path '()) (g (make-parameter 'g)) (c #f)) (let ((add (lambda () (set! path (cons (f) path))))) (add) (parameterize ((f 'b) (g (call-with-current-continuation (lambda (c0) (set! c c0) 'c)))) (add) (f (g)) (add)) (f 'd) (add) (if (< (length path) 5) (c 'e) (reverse path)))) (a b c d c e d) ;; cf. (a b c d b e d)
The text was updated successfully, but these errors were encountered:
Fix pushed. 45e7262
The fix isn't ideal; we may revise it later.
Sorry, something went wrong.
No branches or pull requests
When an error is thrown within guard procedure.
Reported by Joo ChurlSoo. Here's a sample session exhibiting the bug.
gosh> (use gauche.parameter)
gosh>
(define a (make-parameter 1 number->string))
(define b (make-parameter 2 number->string))
a
gosh> b
gosh> (list (a) (b))
("1" "2")
gosh> (parameterize ((a 10) (b 20) (a 30) (b 40)) (list (a) (b)))
("30" "40")
gosh> (list (a) (b))
("10" "20")
gosh> (a 1) (b 2)
"10"
gosh> "20"
gosh> (list (a) (b))
("1" "2")
gosh> (parameterize ((a 10) (b 20) (a 30) (b 'ab)) (list (a) (b)))
*** ERROR: number required: ab
Stack Trace:
0 (P L)
[unknown location]
1 (^ () (set! S (P L)) (set! S (P L)) (set! S (P L)) (set! S (P L)))
[unknown location]
2 (eval expr env)
At line 179 of "c:\tilde\gauche\share\gauche-0.9\0.9.4\lib/gauche/interactive.scm"
gosh> (list (a) (b))
("30" "20")
gosh> (let ((f (make-parameter 'a))
(path '())
(g (make-parameter 'g))
(c #f))
(let ((add (lambda () (set! path (cons (f) path)))))
(add)
(parameterize ((f 'b)
(g (call-with-current-continuation
(lambda (c0) (set! c c0) 'c))))
(add) (f (g)) (add))
(f 'd)
(add)
(if (< (length path) 5)
(c 'e)
(reverse path))))
(a b c d c e d) ;; cf. (a b c d b e d)
The text was updated successfully, but these errors were encountered: