compatibility/collects/mzlib/cm-accomplice.ss
Matthew Flatt 1979addf8f .
original commit: 91bb4b4a96fb471fd79a3e48c2d7b12763fcd18e
2004-04-27 16:53:55 +00:00

20 lines
621 B
Scheme

(module cm-accomplice mzscheme
(provide register-external-file)
(define (register-external-file f)
(unless (and (path? f)
(complete-path? f))
(raise-type-error 'register-external-file "complete path" f))
(let ([param (lambda () void)])
;; Load the code in a separate thread, so that the dynamic
;; extent of this one (likely a phase-sensitive macro expansion)
;; doesn't pollute the load:
(thread-wait
(thread (lambda ()
(set! param
(dynamic-require '(lib "cm-ctime.ss" "mzlib" "private")
'current-external-file-registrar)))))
((param) f))))