Tuesday, February 17, 2009

Unit Contracts in PLT Web Server

The PLT Web Server now uses unit contracts throughout. Go team!

3 comments:

Stevie Strickland said...

It's nice to have a client I know will exercise them well. Definitely let me know if you run into any issues!

I don't know if you need any struct protection, but if so, look at struct/ctc. I did that after that post which is why it's not in there. I'll probably be making a follow-up post describing more features that have been requested since in both unit contracts and contract regions.

Jay McCarthy said...

I probably will need it when I add unit contracts to the XML collection. The big thing there is that some of the signature elements will be used in the contracts, i.e.:

(contracted
[xexpr/c contract?]
[xexpr->string (xexpr/c . -> . string?)])

I wonder if that will cause problems...

Stevie Strickland said...

If you're using elements from the same signature, then rejoice, for it will (should) work just as you'd like it to!

If it's cross-signature (I can give an example over email), then not yet, though I do plan to add some features that will make it possible once I'm done with my short-term deadlines.