doc fixes

This commit is contained in:
Spencer Florence 2015-04-07 11:55:15 -04:00
parent 3e304d0b7c
commit f8c2829ed6
2 changed files with 10 additions and 9 deletions

View File

@ -191,13 +191,8 @@ in "coverage.rkt". This raw coverage information is converted to a usable form b
(define (clear-coverage!)
(current-cover-environment (make-cover-environment)))
(define (make-kernel-namespace)
(define ns (make-empty-namespace))
(define cns (current-namespace))
(namespace-attach-module cns ''#%builtin ns)
ns)
(define (make-cover-environment [ns (make-kernel-namespace)])
(define (make-cover-environment [ns (make-empty-namespace)])
(kernelize-namespace! ns)
(parameterize ([current-namespace ns])
(define ann (load-annotate-top))
(environment
@ -206,6 +201,10 @@ in "coverage.rkt". This raw coverage information is converted to a usable form b
ann
(load-raw-coverage))))
(define (kernelize-namespace! ns)
(define cns (current-namespace))
(namespace-attach-module cns ''#%builtin ns))
(define (get-annotate-top)
(get-val environment-ann-top))
(define (load-annotate-top)

View File

@ -88,7 +88,7 @@ Tests if the given value is a coverage environment.}
@defparam[current-cover-environment environment environment?
#:value (make-cover-environment)]{
The current coverage environment. Defaults to an environment built from
@racket[make-empty-namespace]}
@racket[make-empty-namespace].}
@defproc[(environment-namespace [environment environment?]) namespace?]{
Get the namespace that coverage should be run in. This is the same namespace given to
@racket[make-cover-environment]}
@ -101,4 +101,6 @@ annotations. That code must be run in @racket[environment]'s namespace.}
@defproc[(make-cover-environment [namespace namespace? (make-empty-namespace)]) environment?]{
Makes a coverage environment such that @racket[environment-namespace] will return
@racket[namespace], and @racket[namespace] will be set up to handle coverage information.}
@racket[namespace], and @racket[namespace] will be set up to handle coverage information. If
@racket[namespace] has been used in a different environment the two environments will share coverage
information.}