Hi Chickeneers,

learning from srfi-154 it seems there is a bug in make-parameter/parameterize.

Here a simplified and shortend implementation of srfi-157 plus a test
lifted from the srfi.  With chicken (tested with version 4.11.1) it
fails (returns #f).  (chibi-scheme passes the test returning #t.)

Best

/Jörg

(let* ((current-dynamic-extent
       (lambda ()
         (call-with-current-continuation
          (lambda (return)
            (call-with-values
                (lambda ()
                  (call-with-current-continuation
                   (lambda (c)
                     (return
                      (lambda (thunk)
                        (call-with-current-continuation
                         (lambda (k)
                           (c k thunk))))))))
              (lambda (k thunk)
                (call-with-values thunk k)))))))
      (with-dynamic-extent
       (lambda (dynamic-extent thunk)
         (dynamic-extent thunk))))
(eq?
  (let*
      ((x (make-parameter 'a))
       (de (parameterize
            ((x 'b))
            (current-dynamic-extent))))
    (parameterize
     ((x 'c))
     (with-dynamic-extent
      de
      (lambda ()
        (x)))))
  'b))

;;;------------


_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to