[plt-scheme] provide/contract

From: Dave Gurnell (d.j.gurnell at gmail.com)
Date: Wed May 21 02:59:06 EDT 2008

With the new custom require and provide forms, is there a plan in the  
works to merge provide and provide/contract? It'd be quite useful to  
be able to do this:

(define-struct person (name age))

(define (create-person name)
   (make-person name 0))

(provide (except-out (contract-out struct person ([name string?] [age  
number?]))
                      make-person)
          (rename-out ((contract-out create-person (-> string? person?))
                       make-person)))

I currently do this sort of thing with two modules: a private module  
defines and adds contracts to the structure type, while a public  
module does the renaming and hiding of the default constructor.

-- Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20080521/a07bcadc/attachment.html>

Posted on the users mailing list.