[plt-scheme] provide/contract
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>