On Apr 15, 2015, at 2:29 PM, Jon Zeppieri <[email protected]> wrote:
> I'm trying to provide a struct, the struct type of which uses > prop:procedure and prop:match-expander, and I'd like the procedure to > have a contract. > > If I simply (provide <identifier>) Is this identifier the constructor function, or an instance of this struct? If it’s the constructor function, then couldn’t you use (provide (contract-out [struct id ([field contract] …)])) for that? If it’s an instance, then are you doing something different to define it as a transformer binding? > then both the procedure binding and > transformer binding are exported, but if I (provide/contract > [<identifier> <contract>]), then only the procedure is exported, and I > can't separately export the transformer binding with the same name. > > Presumably, I could attach a contract to the procedure prior to > exporting it -- I could, for example, define it using define/contract > -- but then the wrong module would be blamed. > > What's the best way to handle this case? > > -Jon > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

