chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #1336: Another parameterize issue reported by Joo Chu


From: Chicken Trac
Subject: [Chicken-janitors] #1336: Another parameterize issue reported by Joo ChurlSoo
Date: Tue, 06 Dec 2016 20:02:31 -0000

#1336: Another parameterize issue reported by Joo ChurlSoo
----------------------------+--------------------------------
 Reporter:  mario           |                 Owner:
     Type:  defect          |                Status:  new
 Priority:  major           |             Milestone:  someday
Component:  core libraries  |               Version:  4.11.0
 Keywords:  parameterize    |  Estimated difficulty:
----------------------------+--------------------------------
 Reported by Joo ChurlSoo via e-mail.

 {{{
 CHICKEN
 (c) 2008-2016, The CHICKEN Team
 (c) 2000-2007, Felix L. Winkelmann
 Version 4.11.0 (rev ce980c4)
 windows-mingw32-x86 [ manyargs dload ptables ]
 compiled 2016-05-28 on yves.more-magic.net (Linux)
 #;1> (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) 8)
          (c 'e)
          (reverse path))))
 (a b c d b e d b e d) ; correct

 #;2> (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) 8)
          (c 'e)
          (reverse path))))
 (a b c d a e d d e d) ; seems to be incorrect
 ;; (cf.)
 (a b c d c e d e e d)
 }}}

--
Ticket URL: <https://bugs.call-cc.org/ticket/1336>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]