Attached is another version that adds:

better error messages everywhere
#:super
#:property
#:guard
#:inspector
#:transparent
#:prefab
compatibility with define-struct [you can use an sstruct as a struct parent]
compatibility with scheme/match's struct expander [you can use an
sstruct as a struct arg]

All with more tests, of course.

--

My #:super doesn't work the same as define-struct's.

I still don't support #:omit-define-syntaxes or #:omit-define-values.

I don't support #:auto. But should I since I allow default-value expressions?

I'm not sure what else is needed. Would we want to use this as the
default define-struct in #lang racket? Or should I put this in
unstable or on planet?

Jay

--

It requires revision 18730 of scheme/private/struct-info.
It requires the following patch to syntax/private/stxparse/rep:

Index: rep.ss
===================================================================
--- rep.ss      (revision 18530)
+++ rep.ss      (working copy)
@@ -843,11 +843,11 @@
                        "expected exact nonnegative integer or +inf.0"))
        (when (> minN maxN)
          (wrong-syntax stx "minimum larger than maximum repetition
constraint"))
-       (let ([chunks (parse-keyword-options #'options
+       (let ([chunks (parse-keyword-options/eol #'options
          (let ([too-few-msg
                 (options-select-value chunks '#:too-few #:default #'#f)]
                [too-many-msg

Ryan has received this and says he will commit it imminently.

On Sat, Apr 3, 2010 at 7:08 AM, Matthew Flatt <[email protected]> wrote:
> At Sat, 3 Apr 2010 06:31:58 -0400, Sam Tobin-Hochstadt wrote:
>> I think that it's struct type info that needs to be the property,
>
> `prop:struct-info' added in SVN.
>
>
>



-- 
Jay McCarthy <[email protected]>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93

Attachment: sstruct-syn.ss
Description: Binary data

Attachment: sstruct-tests.ss
Description: Binary data

Attachment: sstruct.ss
Description: Binary data

_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Reply via email to