get-module-code repair
This commit is contained in:
parent
a6a1b02de5
commit
6743900fc7
|
@ -193,7 +193,13 @@
|
|||
[(or (eq? prefer 'src)
|
||||
path-d)
|
||||
(notify path)
|
||||
(extract-submodule (with-dir (lambda () (compiler (read-one orig-path path #t read-src-syntax)))))]
|
||||
(define (compile-one)
|
||||
(with-dir (lambda () (compiler (read-one orig-path path #t read-src-syntax)))))
|
||||
(if (null? submodule-path)
|
||||
;; allow any result:
|
||||
(compile-one)
|
||||
;; expect a compiled-module result:
|
||||
(extract-submodule (compile-one)))]
|
||||
;; Report a not-there error
|
||||
[else (raise (make-exn:get-module-code
|
||||
(format "get-module-code: no such file: ~e" orig-path)
|
||||
|
|
|
@ -35,7 +35,8 @@ module.
|
|||
|
||||
The @racket[compile-proc] argument defaults to @racket[compile]. This
|
||||
procedure is used to compile module source if an already-compiled
|
||||
version is not available.
|
||||
version is not available. If @racket[submodule-path] is not @racket['()],
|
||||
then @racket[compile-proc] must return a compiled module form.
|
||||
|
||||
The @racket[ext-proc] argument defaults to @racket[#f]. If it is not
|
||||
@racket[#f], it must be a procedure of two arguments that is called
|
||||
|
|
Loading…
Reference in New Issue
Block a user