Support environment variable procedures.
This commit is contained in:
parent
b1818723dc
commit
88f896c121
|
@ -266,6 +266,7 @@ These are not part of the numeric tower.
|
|||
@defidform[FSemaphore]
|
||||
@defidform[Will-Executor]
|
||||
@defidform[Pseudo-Random-Generator]
|
||||
@defidform[Environment-Variables]
|
||||
)]{
|
||||
These types represent primitive Racket data.
|
||||
|
||||
|
|
|
@ -2964,6 +2964,14 @@
|
|||
(->opt [(Un (-val #f) (-val 'subprocesses) -Thread)] -Fixnum)]
|
||||
|
||||
;; Section 15.7
|
||||
[environment-variables? (make-pred-ty -Environment-Variables)]
|
||||
[current-environment-variables (-Param -Environment-Variables)]
|
||||
[bytes-environment-variable-name? (asym-pred Univ B (-PS (-is-type 0 -Bytes) -tt))]
|
||||
[make-environment-variables (->* null -Bytes -Environment-Variables)]
|
||||
[environment-variables-ref (-> -Environment-Variables -Bytes (-opt -Bytes))]
|
||||
[environment-variables-set! (->opt -Environment-Variables -Bytes (-opt -Bytes) [(-> Univ)] Univ)]
|
||||
[environment-variables-names (-> -Environment-Variables (-lst -Bytes))]
|
||||
[string-environment-variable-name? (asym-pred Univ B (-PS (-is-type 0 -) -tt))]
|
||||
[getenv (-> -String (Un -String (-val #f)))]
|
||||
[putenv (-> -String -String B)]
|
||||
|
||||
|
|
|
@ -160,6 +160,7 @@
|
|||
[Place-Channel -Place-Channel]
|
||||
[Place -Place]
|
||||
[Will-Executor -Will-Executor]
|
||||
[Environment-Variables -Environment-Variables]
|
||||
|
||||
|
||||
[Listof -Listof]
|
||||
|
|
|
@ -251,6 +251,8 @@
|
|||
(define/decl -Place-Channel (Un -Place -Base-Place-Channel))
|
||||
(define/decl -Will-Executor
|
||||
(make-Base 'Will-Executor #'will-executor? will-executor?))
|
||||
(define/decl -Environment-Variables
|
||||
(make-Base 'Environment-Variables #'environment-variables? environment-variables?))
|
||||
|
||||
;; Paths
|
||||
(define/decl -car (make-CarPE))
|
||||
|
|
Loading…
Reference in New Issue
Block a user