Rename open-place to place/context.

This commit is contained in:
Vincent St-Amour 2015-07-28 15:54:16 -05:00
parent e3ed57633e
commit 496cd97351
2 changed files with 4 additions and 4 deletions

View File

@ -262,7 +262,7 @@ The @racket[place] binding is protected in the same way as
The @racket[place*] binding is protected in the same way as The @racket[place*] binding is protected in the same way as
@racket[dynamic-place].} @racket[dynamic-place].}
@defform[(open-place id body ...+)]{ @defform[(place/context id body ...+)]{
Like @racket[place], but @racket[body ...] may have free lexical Like @racket[place], but @racket[body ...] may have free lexical
variables, which are automatically sent to the newly-created place. variables, which are automatically sent to the newly-created place.
Note that these variables must have values accepted by Note that these variables must have values accepted by

View File

@ -33,7 +33,7 @@
processor-count processor-count
(protect-out place (protect-out place
place*) place*)
open-place place/context
(rename-out [pl-place-enabled? place-enabled?]) (rename-out [pl-place-enabled? place-enabled?])
place-dead-evt place-dead-evt
place-location? place-location?
@ -232,7 +232,7 @@
(error who "the enclosing module's resolved name is not a path or predefined")) (error who "the enclosing module's resolved name is not a path or predefined"))
(start-place-func who (if (symbol? name) `(quote ,name) name) func-name in out err)) (start-place-func who (if (symbol? name) `(quote ,name) name) func-name in out err))
(define-syntax (open-place stx) (define-syntax (place/context stx)
(syntax-parse stx (syntax-parse stx
[(_ ch:id body:expr ...) [(_ ch:id body:expr ...)
(define b #'(let () body ...)) (define b #'(let () body ...))
@ -248,7 +248,7 @@
(for ([e (in-vector vec)] (for ([e (in-vector vec)]
[n (in-list (syntax->list (quote-syntax (fvs ...))))]) [n (in-list (syntax->list (quote-syntax (fvs ...))))])
(unless (place-message-allowed? e) (unless (place-message-allowed? e)
(raise-arguments-error 'open-place (raise-arguments-error 'place/context
"free variable values must be allowable as place messages" "free variable values must be allowable as place messages"
(symbol->string (syntax-e n)) e))) (symbol->string (syntax-e n)) e)))
(place-channel-put p vec) (place-channel-put p vec)