Rename cstruct to struct/ctc, to avoid confusion with cstruct from the ffi.

svn: r13661
This commit is contained in:
Stevie Strickland 2009-02-16 14:50:59 +00:00
parent c056bcf6d1
commit c6b92782e2
5 changed files with 14 additions and 14 deletions

View File

@ -11,14 +11,14 @@
(define-syntax-rule (bindc id)
(begin
(require (for-label scheme/unit))
(define id (scheme cstruct))))
(bindc scheme-cstruct))
(define id (scheme struct/ctc))))
(bindc scheme-struct/ctc))
@mzlib[#:mode title unit]
The @schememodname[mzlib/unit] library mostly re-provides
@schememodname[scheme/unit], except for @scheme-struct and
@scheme-cstruct from @schememodname[scheme/unit].
@scheme-struct/ctc from @schememodname[scheme/unit].
@defform/subs[(struct id (field-id ...) omit-decl ...)
([omit-decl -type
@ -29,11 +29,11 @@ The @schememodname[mzlib/unit] library mostly re-provides
A signature form like @scheme-struct from @schememodname[scheme/unit],
but with a different syntax for the options that limit exports.}
@defform/subs[(cstruct id ([field-id contract-expr] ...) omit-decl ...)
@defform/subs[(struct/ctc id ([field-id contract-expr] ...) omit-decl ...)
([omit-decl -type
-selectors
-setters
-constructor])]{
A signature form like @scheme-cstruct from @schememodname[scheme/unit],
A signature form like @scheme-struct/ctc from @schememodname[scheme/unit],
but with a different syntax for the options that limit exports.}

View File

@ -20,7 +20,7 @@
"private/unit-runtime.ss"
"private/unit-utils.ss")
(provide define-signature-form struct cstruct open
(provide define-signature-form struct struct/ctc open
define-signature provide-signature-elements
only except rename import export prefix link tag init-depend extends contracted
unit?
@ -126,7 +126,7 @@
((_)
(raise-stx-err "missing name and fields")))))
(define-signature-form (cstruct stx)
(define-signature-form (struct/ctc stx)
(parameterize ((error-syntax stx))
(syntax-case stx ()
((_ name ([field ctc] ...) . omissions)

View File

@ -5,9 +5,9 @@
(for-syntax scheme/base
syntax/struct))
(provide (except-out (all-from-out mzlib/unit)
struct cstruct)
struct struct/ctc)
(rename-out [struct* struct]
[cstruct* cstruct]))
[struct/ctc* struct/ctc]))
;; Replacement `struct' signature form:
(define-signature-form (struct* stx)
@ -102,8 +102,8 @@
"missing name and fields"
stx))))
;; Replacement cstruct form
(define-signature-form (cstruct* stx)
;; Replacement struct/ctc form
(define-signature-form (struct/ctc* stx)
(syntax-case stx ()
((_ name ([field ctc] ...) opt ...)
(begin

View File

@ -615,7 +615,7 @@ where the extra option @scheme[#:omit-constructor] omits the
@schemeidfont{make-}@scheme[id] identifier.}
@defform/subs[
(cstruct id ([field contract-expr] ...) option ...)
(struct/ctc id ([field contract-expr] ...) option ...)
([field id
[id #:mutable]]
@ -624,7 +624,7 @@ where the extra option @scheme[#:omit-constructor] omits the
#:omit-define-syntaxes
#:omit-define-values])]{
For use with @scheme[define-signature]. The @scheme[cstruct] form works
For use with @scheme[define-signature]. The @scheme[struct/ctc] form works
similarly to @scheme[struct], but the constructor, predicate, field
accessors, and field mutators are contracted appropriately.}

View File

@ -796,7 +796,7 @@
(let ()
(define-signature student^
((cstruct student ([name string?] [id number?]))))
((struct/ctc student ([name string?] [id number?]))))
(define-unit student@
(import)
(export student^)