move scribble/example
contracts to scribble/eval
Moving the contracts to the original exports ensures that the bindings from both modules are the same. In particular, making the bindings different caused the documentation to have missing links.
This commit is contained in:
parent
800d08fbef
commit
c3d4ebc737
|
@ -33,18 +33,30 @@
|
||||||
defexamples*
|
defexamples*
|
||||||
as-examples
|
as-examples
|
||||||
|
|
||||||
make-base-eval
|
(contract-out
|
||||||
make-base-eval-factory
|
[make-base-eval
|
||||||
make-eval-factory
|
(->* [] [#:pretty-print? any/c #:lang lang-option/c] #:rest any/c any)]
|
||||||
close-eval
|
[make-base-eval-factory
|
||||||
|
eval-factory/c]
|
||||||
|
[make-eval-factory
|
||||||
|
eval-factory/c]
|
||||||
|
[close-eval
|
||||||
|
(-> any/c any)]
|
||||||
|
|
||||||
|
[scribble-exn->string
|
||||||
|
(-> any/c string?)]
|
||||||
|
[scribble-eval-handler
|
||||||
|
(parameter/c (-> (-> any/c any) boolean? any/c any))]
|
||||||
|
[make-log-based-eval
|
||||||
|
(-> path-string? (or/c 'record 'replay) any)])
|
||||||
|
|
||||||
scribble-exn->string
|
|
||||||
scribble-eval-handler
|
|
||||||
with-eval-preserve-source-locations)
|
with-eval-preserve-source-locations)
|
||||||
|
|
||||||
(provide/contract
|
(define lang-option/c
|
||||||
[make-log-based-eval
|
(or/c module-path? (list/c 'special symbol?) (cons/c 'begin list?)))
|
||||||
(-> path-string? (or/c 'record 'replay) (-> any/c any))])
|
|
||||||
|
(define eval-factory/c
|
||||||
|
(->* [(listof module-path?)] [#:pretty-print? any/c #:lang lang-option/c] any))
|
||||||
|
|
||||||
(define scribble-eval-handler
|
(define scribble-eval-handler
|
||||||
(make-parameter (lambda (ev c? x) (ev x))))
|
(make-parameter (lambda (ev c? x) (ev x))))
|
||||||
|
|
|
@ -1,36 +1,22 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(require "eval.rkt"
|
(require "eval.rkt"
|
||||||
racket/contract
|
|
||||||
(only-in "struct.rkt" make-paragraph)
|
(only-in "struct.rkt" make-paragraph)
|
||||||
(for-syntax racket/base
|
(for-syntax racket/base
|
||||||
syntax/parse))
|
syntax/parse))
|
||||||
|
|
||||||
(define lang-option/c
|
|
||||||
(or/c module-path? (list/c 'special symbol?) (cons/c 'begin list?)))
|
|
||||||
|
|
||||||
(define eval-factory/c
|
|
||||||
(->* [(listof module-path?)] [#:pretty-print? any/c #:lang lang-option/c] any))
|
|
||||||
|
|
||||||
(provide examples
|
(provide examples
|
||||||
|
|
||||||
;; Re-exports:
|
;; Re-exports:
|
||||||
(contract-out
|
make-base-eval
|
||||||
[make-base-eval
|
make-base-eval-factory
|
||||||
(->* [] [#:pretty-print? any/c #:lang lang-option/c] #:rest any/c any)]
|
make-eval-factory
|
||||||
[make-base-eval-factory
|
close-eval
|
||||||
eval-factory/c]
|
|
||||||
[make-eval-factory
|
|
||||||
eval-factory/c]
|
|
||||||
[close-eval
|
|
||||||
(-> any/c any)]
|
|
||||||
|
|
||||||
[scribble-exn->string
|
make-log-based-eval
|
||||||
(-> any/c string?)]
|
scribble-exn->string
|
||||||
[scribble-eval-handler
|
scribble-eval-handler
|
||||||
(parameter/c (-> (-> any/c any) boolean? any/c any))]
|
make-log-based-eval)
|
||||||
[make-log-based-eval
|
|
||||||
(-> path-string? (or/c 'record 'replay) any)]))
|
|
||||||
|
|
||||||
(define example-title
|
(define example-title
|
||||||
(make-paragraph (list "Example:")))
|
(make-paragraph (list "Example:")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user