parallel-compile-files: fix docs and argument check for the handler callback

This commit is contained in:
Matthew Flatt 2014-11-09 08:39:41 -07:00
parent c5a130454d
commit de65bb5586
2 changed files with 4 additions and 3 deletions

View File

@ -471,7 +471,8 @@ functionality of @exec{raco setup} and @exec{raco make}.}
@defproc[(parallel-compile-files [list-of-files (listof path-string?)]
[#:worker-count worker-count exact-positive-integer? (processor-count)]
[#:handler handler (->i ([handler-type symbol?]
[#:handler handler (->i ([worker-id exact-integer?]
[handler-type symbol?]
[path path-string?]
[msg string?]
[out string?]

View File

@ -345,8 +345,8 @@
(raise-argument-error 'parallel-compile-files "exact-positive-integer?" worker-count))
(unless (and (list? list-of-files) (andmap path-string? list-of-files))
(raise-argument-error 'parallel-compile-files "(listof path-string?)" list-of-files))
(unless (and (procedure? handler) (procedure-arity-includes? handler 5))
(raise-argument-error 'parallel-compile-files "(procedure-arity-includes/c 5)" handler))
(unless (and (procedure? handler) (procedure-arity-includes? handler 6))
(raise-argument-error 'parallel-compile-files "(procedure-arity-includes/c 6)" handler))
(parallel-build (make-object file-list-queue% list-of-files handler options) worker-count))
(define (parallel-compile worker-count setup-fprintf append-error collects-tree)