From c6b92782e234f99f488e12137b608e2553151dea Mon Sep 17 00:00:00 2001 From: Stevie Strickland Date: Mon, 16 Feb 2009 14:50:59 +0000 Subject: [PATCH] Rename cstruct to struct/ctc, to avoid confusion with cstruct from the ffi. svn: r13661 --- collects/mzlib/scribblings/unit.scrbl | 10 +++++----- collects/mzlib/unit.ss | 4 ++-- collects/scheme/unit.ss | 8 ++++---- collects/scribblings/reference/units.scrbl | 4 ++-- collects/tests/units/test-unit-contracts.ss | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/collects/mzlib/scribblings/unit.scrbl b/collects/mzlib/scribblings/unit.scrbl index 34e059c53d..55075ccb04 100644 --- a/collects/mzlib/scribblings/unit.scrbl +++ b/collects/mzlib/scribblings/unit.scrbl @@ -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.} diff --git a/collects/mzlib/unit.ss b/collects/mzlib/unit.ss index ba3e245e44..8bfd095388 100644 --- a/collects/mzlib/unit.ss +++ b/collects/mzlib/unit.ss @@ -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) diff --git a/collects/scheme/unit.ss b/collects/scheme/unit.ss index 525ff1750b..6909a99c8b 100644 --- a/collects/scheme/unit.ss +++ b/collects/scheme/unit.ss @@ -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 diff --git a/collects/scribblings/reference/units.scrbl b/collects/scribblings/reference/units.scrbl index a03e6da916..bbea44dcbe 100644 --- a/collects/scribblings/reference/units.scrbl +++ b/collects/scribblings/reference/units.scrbl @@ -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.} diff --git a/collects/tests/units/test-unit-contracts.ss b/collects/tests/units/test-unit-contracts.ss index fd86391969..1af534f9fe 100644 --- a/collects/tests/units/test-unit-contracts.ss +++ b/collects/tests/units/test-unit-contracts.ss @@ -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^)