io: fix current-directory
and related parameters
For consistency with traditional Racket, the guards need to be implemented through derived parameters instead of chaperones.
This commit is contained in:
parent
caf28648e3
commit
3e480f1c93
|
@ -44,13 +44,17 @@
|
||||||
path]))
|
path]))
|
||||||
|
|
||||||
(define/who current-directory
|
(define/who current-directory
|
||||||
(chaperone-procedure raw:current-directory (make-guard-paths who)))
|
(let ([guard (make-guard-paths who)])
|
||||||
|
(make-derived-parameter raw:current-directory guard guard)))
|
||||||
|
|
||||||
(define/who current-directory-for-path->complete-path
|
(define/who current-directory-for-path->complete-path
|
||||||
(chaperone-procedure raw:current-directory (make-guard-paths 'path->complete-path)))
|
(let ([guard (make-guard-paths 'path->complete-path)])
|
||||||
|
(make-derived-parameter raw:current-directory guard guard)))
|
||||||
|
|
||||||
(define/who current-directory-for-user
|
(define/who current-directory-for-user
|
||||||
(chaperone-procedure raw:current-directory-for-user (make-guard-paths who)))
|
(let ([guard (make-guard-paths who)])
|
||||||
|
(make-derived-parameter raw:current-directory-for-user guard guard)))
|
||||||
|
|
||||||
(define/who current-load-relative-directory
|
(define/who current-load-relative-directory
|
||||||
(chaperone-procedure raw:current-load-relative-directory (make-guard-paths who)))
|
(let ([guard (make-guard-paths who)])
|
||||||
|
(make-derived-parameter raw:current-load-relative-directory guard guard)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user