made load feel like a top-level by consuming the contents of the
given file one expression at a time. Most notable difference is observed when the loaded file captures a conitnuation in one expression. Re-invoking this continuation should evaluate the next expression that has not been evaluated yet, and not the expression following the call/cc.
This commit is contained in:
parent
90175f528f
commit
0a7a3a8266
|
@ -81,7 +81,13 @@
|
|||
(die 'load "not a string" x))
|
||||
(unless (procedure? eval-proc)
|
||||
(die 'load "not a procedure" eval-proc))
|
||||
(for-each eval-proc (read-script-source-file x))]))
|
||||
(let ([ls (read-script-source-file x)])
|
||||
(let f ()
|
||||
(unless (null? ls)
|
||||
(let ([a (car ls)])
|
||||
(set! ls (cdr ls))
|
||||
(eval-proc a))
|
||||
(f))))]))
|
||||
(define load-r6rs-top-level
|
||||
(lambda (x how)
|
||||
(let ([prog (read-script-source-file x)])
|
||||
|
|
|
@ -1 +1 @@
|
|||
1616
|
||||
1617
|
||||
|
|
Loading…
Reference in New Issue