raco setup: use lazy ".zo" parsing for dpeendency checking

Lazy ".zo" parsing make the dependency check take about half as
long.
This commit is contained in:
Matthew Flatt 2016-01-01 12:03:06 -07:00
parent d3bb9d0412
commit c9a1dc781e

View File

@ -368,10 +368,12 @@
(define in-mod `(lib ,(string-join (define in-mod `(lib ,(string-join
(append (map path-element->string coll-path) (list base)) (append (map path-element->string coll-path) (list base))
"/"))) "/")))
(define zo-path (build-path dir zo-f))
(define mod-code (call-with-input-file* (define mod-code (call-with-input-file*
(build-path dir zo-f) zo-path
(lambda (i) (lambda (i)
(parameterize ([read-accept-compiled #t]) (parameterize ([read-accept-compiled #t]
[read-on-demand-source zo-path])
(read i))))) (read i)))))
;; Recur to cover submodules: ;; Recur to cover submodules:
(let loop ([mod-code mod-code]) (let loop ([mod-code mod-code])