doc fixups for struct' variants in
scheme/unit', etc.
This commit is contained in:
parent
67936fcc52
commit
3ded3934ee
|
@ -12,10 +12,13 @@
|
||||||
|
|
||||||
(define-syntax (mzlib stx)
|
(define-syntax (mzlib stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(_ #:mode section name)
|
[(_ #:mode section name #:use-sources (src ...))
|
||||||
(with-syntax ([lib (string->symbol
|
(with-syntax ([lib (string->symbol
|
||||||
(format "mzlib/~a" (syntax-e #'name)))])
|
(format "mzlib/~a" (syntax-e #'name)))])
|
||||||
#'(begin
|
#'(begin
|
||||||
(section #:style 'hidden (racket lib))
|
(section #:style 'hidden (racket lib))
|
||||||
(defmodule lib)))]
|
(defmodule lib #:use-sources (src ...))))]
|
||||||
[(_ name) #'(mzlib #:mode section name)]))
|
[(_ #:mode section name)
|
||||||
|
#'(mzlib #:mode section name #:use-sources ())]
|
||||||
|
[(_ name)
|
||||||
|
#'(mzlib #:mode section name #:use-sources ())]))
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
@(begin
|
@(begin
|
||||||
(define-syntax-rule (bind id)
|
(define-syntax-rule (bind id)
|
||||||
(begin
|
(begin
|
||||||
(require (for-label racket/unit))
|
(require (for-label racket/base))
|
||||||
(define id (racket struct))))
|
(define id (racket struct))))
|
||||||
(bind racket-struct)
|
(bind racket-struct)
|
||||||
(define-syntax-rule (bindc id)
|
(define-syntax-rule (bindc id)
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
(define id (racket struct/ctc))))
|
(define id (racket struct/ctc))))
|
||||||
(bindc racket-struct/ctc))
|
(bindc racket-struct/ctc))
|
||||||
|
|
||||||
@mzlib[#:mode title unit]
|
@mzlib[#:mode title unit #:use-sources ((submod racket/unit compat))]
|
||||||
|
|
||||||
@deprecated[@racketmodname[racket/unit]]{}
|
@deprecated[@racketmodname[racket/unit]]{}
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ The @racketmodname[mzlib/unit] library mostly re-provides
|
||||||
-setters
|
-setters
|
||||||
-constructor])]{
|
-constructor])]{
|
||||||
|
|
||||||
A signature form like @racket-struct from @racketmodname[racket/unit],
|
A signature form like @racket-struct from @racketmodname[racket/base],
|
||||||
but with a different syntax for the options that limit exports.}
|
but with a different syntax for options that limit exports.}
|
||||||
|
|
||||||
@defform/subs[(struct/ctc id ([field-id contract-expr] ...) omit-decl ...)
|
@defform/subs[(struct/ctc id ([field-id contract-expr] ...) omit-decl ...)
|
||||||
([omit-decl -type
|
([omit-decl -type
|
||||||
|
@ -40,18 +40,18 @@ but with a different syntax for the options that limit exports.}
|
||||||
A signature form like @racket-struct/ctc from @racketmodname[racket/unit],
|
A signature form like @racket-struct/ctc from @racketmodname[racket/unit],
|
||||||
but with a different syntax for the options that limit exports.}
|
but with a different syntax for the options that limit exports.}
|
||||||
|
|
||||||
@deftogether[(
|
|
||||||
@defidform[struct~s]
|
|
||||||
@defidform[struct~s/ctc]
|
|
||||||
)]{
|
|
||||||
|
|
||||||
The same as @|racket-struct| and @|racket-struct/ctc| from
|
|
||||||
@racketmodname[racket/unit].}
|
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
@defidform[struct~r]
|
@defidform[struct~r]
|
||||||
@defidform[struct~r/ctc]
|
@defidform[struct~r/ctc]
|
||||||
)]{
|
)]{
|
||||||
|
|
||||||
Like @racket[struct~s] and @racket[struct~s/ctc], but the constructor is
|
The same as @|racket-struct| from @racketmodname[racket/base] and @|racket-struct/ctc| from
|
||||||
|
@racketmodname[racket/unit].}
|
||||||
|
|
||||||
|
@deftogether[(
|
||||||
|
@defidform[struct~s]
|
||||||
|
@defidform[struct~s/ctc]
|
||||||
|
)]{
|
||||||
|
|
||||||
|
Like @racket[struct~r] and @racket[struct~r/ctc], but the constructor is
|
||||||
named the same as the type, instead of with @racketidfont{make-} prefix.}
|
named the same as the type, instead of with @racketidfont{make-} prefix.}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
;; deprecated library, see `racket/unit`
|
;; deprecated library, see `racket/unit`
|
||||||
|
|
||||||
(require racket/unit
|
(require (except-in racket/unit struct/ctc)
|
||||||
(submod racket/unit compat))
|
(submod racket/unit compat))
|
||||||
(provide (except-out (all-from-out racket/unit) struct/ctc)
|
(provide (all-from-out racket/unit)
|
||||||
(all-from-out (submod racket/unit compat)))
|
(all-from-out (submod racket/unit compat)))
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
(module+ compat
|
(module+ compat
|
||||||
;; export only for compatibility with `mzlib/unit`
|
;; export only for compatibility with `mzlib/unit`
|
||||||
(provide (protect-out struct))
|
(provide (protect-out struct) struct/ctc)
|
||||||
|
|
||||||
(define-signature-form (struct stx)
|
(define-signature-form (struct stx)
|
||||||
(parameterize ((error-syntax stx))
|
(parameterize ((error-syntax stx))
|
||||||
|
@ -551,7 +551,7 @@
|
||||||
stx))))
|
stx))))
|
||||||
(module+ compat
|
(module+ compat
|
||||||
;; export only for compatibility with `mzlib/unit`
|
;; export only for compatibility with `mzlib/unit`
|
||||||
(provide (protect-out struct~s/ctc))
|
(provide (protect-out struct~s/ctc) struct~r/ctc)
|
||||||
|
|
||||||
(define-signature-form (struct~s/ctc stx)
|
(define-signature-form (struct~s/ctc stx)
|
||||||
(do-struct~/ctc stx #t)))
|
(do-struct~/ctc stx #t)))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(require racket/unit
|
(require (except-in racket/unit struct/ctc)
|
||||||
(submod racket/unit compat))
|
(submod racket/unit compat))
|
||||||
(provide (except-out (all-from-out racket/unit) struct/ctc)
|
(provide (all-from-out racket/unit)
|
||||||
(rename-out [struct~s struct]
|
(rename-out [struct~s struct]
|
||||||
[struct~s/ctc struct/ctc]))
|
[struct~s/ctc struct/ctc]))
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
(only-in scheme/class printable<%>)
|
(only-in scheme/class printable<%>)
|
||||||
(only-in racket/class writable<%>)
|
(only-in racket/class writable<%>)
|
||||||
(only-in racket/base struct hash hasheq hasheqv in-directory local-require)
|
(only-in racket/base struct hash hasheq hasheqv in-directory local-require)
|
||||||
|
(only-in racket/unit struct/ctc)
|
||||||
(only-in scheme/gui/base make-gui-namespace make-gui-empty-namespace)
|
(only-in scheme/gui/base make-gui-namespace make-gui-empty-namespace)
|
||||||
|
(only-in mzlib/unit struct~s struct~s/ctc)
|
||||||
scheme/gui/base
|
scheme/gui/base
|
||||||
scheme/sandbox))
|
scheme/sandbox))
|
||||||
|
|
||||||
@(define-syntax-rule (def-extras unit-struct
|
@(define-syntax-rule (def-extras unit-struct
|
||||||
|
unit-struct/ctc
|
||||||
make-base-namespace-id
|
make-base-namespace-id
|
||||||
make-base-empty-namespace-id
|
make-base-empty-namespace-id
|
||||||
sandbox-namespace-specs-id
|
sandbox-namespace-specs-id
|
||||||
|
@ -19,12 +22,13 @@
|
||||||
pretty-print-id
|
pretty-print-id
|
||||||
printable<%>-id)
|
printable<%>-id)
|
||||||
(begin
|
(begin
|
||||||
(require (for-label (only-in scheme struct)
|
(require (for-label (only-in scheme struct struct/ctc)
|
||||||
(only-in racket/base make-base-namespace
|
(only-in racket/base make-base-namespace
|
||||||
make-base-empty-namespace)
|
make-base-empty-namespace)
|
||||||
(only-in racket/pretty pretty-print)
|
(only-in racket/pretty pretty-print)
|
||||||
racket/sandbox))
|
racket/sandbox))
|
||||||
(define unit-struct (racket struct))
|
(define unit-struct (racket struct))
|
||||||
|
(define unit-struct/ctc (racket struct/ctc))
|
||||||
(define make-base-namespace-id (racket make-base-namespace))
|
(define make-base-namespace-id (racket make-base-namespace))
|
||||||
(define make-base-empty-namespace-id (racket make-base-empty-namespace))
|
(define make-base-empty-namespace-id (racket make-base-empty-namespace))
|
||||||
(define sandbox-namespace-specs-id (racket sandbox-namespace-specs))
|
(define sandbox-namespace-specs-id (racket sandbox-namespace-specs))
|
||||||
|
@ -33,6 +37,7 @@
|
||||||
(define pretty-print-id (racket pretty-print))
|
(define pretty-print-id (racket pretty-print))
|
||||||
(define printable<%>-id (racket printable<%>))))
|
(define printable<%>-id (racket printable<%>))))
|
||||||
@(def-extras unit-struct
|
@(def-extras unit-struct
|
||||||
|
unit-struct/ctc
|
||||||
make-base-namespace-id
|
make-base-namespace-id
|
||||||
make-base-empty-namespace-id
|
make-base-empty-namespace-id
|
||||||
sandbox-namespace-specs-id
|
sandbox-namespace-specs-id
|
||||||
|
@ -58,7 +63,7 @@ old name. A few @seclink["compat-exe"]{old executables} are also provided.
|
||||||
@table-of-contents[]
|
@table-of-contents[]
|
||||||
|
|
||||||
@compat-except[scheme racket]{, except based on @racketmodname[scheme/base]
|
@compat-except[scheme racket]{, except based on @racketmodname[scheme/base]
|
||||||
instead of @racketmodname[racket/base], the @|unit-struct| from
|
instead of @racketmodname[racket/base], the @|unit-struct| and @|unit-struct/ctc| from
|
||||||
@racketmodname[scheme/unit] is exported, @racketmodname[scheme/set] is
|
@racketmodname[scheme/unit] is exported, @racketmodname[scheme/set] is
|
||||||
not re-exported, @racketmodname[scheme/system] is
|
not re-exported, @racketmodname[scheme/system] is
|
||||||
not re-exported, @racket[pretty-print] is re-directed in as
|
not re-exported, @racket[pretty-print] is re-directed in as
|
||||||
|
@ -336,7 +341,13 @@ and @|make-module-evaluator-id| from @racketmodname[racket/sandbox].}
|
||||||
@; @compat[scheme/trace racket/trace]
|
@; @compat[scheme/trace racket/trace]
|
||||||
@compat[scheme/trait racket/trait]
|
@compat[scheme/trait racket/trait]
|
||||||
@compat[scheme/udp racket/udp]
|
@compat[scheme/udp racket/udp]
|
||||||
@compat[scheme/unit racket/unit]
|
|
||||||
|
@compat-except[scheme/unit racket/unit]{, except that @|unit-struct|
|
||||||
|
and @|unit-struct/ctc| are @racket[struct~s] and
|
||||||
|
@racket[struct~s/ctc] from @racketmodname[mzlib/unit] instead of
|
||||||
|
@racket[struct] from @racket[racket/base] and @racket[struct/ctc] from
|
||||||
|
@racketmodname[racket/unit]}
|
||||||
|
|
||||||
@compat[scheme/unit-exptime racket/unit-exptime]
|
@compat[scheme/unit-exptime racket/unit-exptime]
|
||||||
@compat[scheme/unsafe/ops racket/unsafe/ops]
|
@compat[scheme/unsafe/ops racket/unsafe/ops]
|
||||||
@compat[scheme/vector racket/vector]
|
@compat[scheme/vector racket/vector]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user