1(module boundmap racket/base 2 (require racket/contract/base 3 (for-syntax racket/base) 4 "private/boundmap.rkt") 5 6 (define-syntax provide/contract* 7 (syntax-rules () 8 [(_ [(name0 name ...) contract]) 9 (begin (provide/contract [name0 contract]) 10 (provide/contract (rename name0 name contract)) ...)] 11 [(_ [name contract]) 12 (provide/contract [name contract])] 13 [(_ [name contract] ...) 14 (begin (provide/contract* [name contract]) ...)])) 15 16 (define-syntax (provide-mapping-code/contract stx) 17 (syntax-case stx () 18 [(_ make-identifier-mapping 19 identifier-mapping? identifier-mapping?/out 20 identifier-mapping-get 21 identifier-mapping-put! 22 identifier-mapping-for-each 23 identifier-mapping-map 24 identifier=?) 25 (syntax 26 (provide/contract* 27 [make-identifier-mapping (-> identifier-mapping?)] 28 [identifier-mapping?/out (any/c . -> . boolean?)] 29 [identifier-mapping-get (->* (identifier-mapping? 30 identifier?) 31 ((-> any)) 32 any)] 33 [identifier-mapping-put! (identifier-mapping? 34 identifier? 35 any/c 36 . -> . 37 void?)] 38 [identifier-mapping-for-each (identifier-mapping? 39 (identifier? any/c . -> . any) 40 . -> . 41 void?)] 42 [identifier-mapping-map (identifier-mapping? 43 (identifier? any/c . -> . any) 44 . -> . 45 (listof any/c))]))])) 46 47 (provide-mapping-code/contract 48 make-bound-identifier-mapping 49 bound-identifier-mapping? bound-identifier-mapping? 50 bound-identifier-mapping-get 51 bound-identifier-mapping-put! 52 bound-identifier-mapping-for-each 53 bound-identifier-mapping-map 54 bound-identifier=?) 55 56 (provide-mapping-code/contract 57 [make-module-identifier-mapping make-free-identifier-mapping] 58 module-identifier-mapping? 59 [module-identifier-mapping? free-identifier-mapping?] 60 [module-identifier-mapping-get free-identifier-mapping-get] 61 [module-identifier-mapping-put! free-identifier-mapping-put!] 62 [module-identifier-mapping-for-each free-identifier-mapping-for-each] 63 [module-identifier-mapping-map free-identifier-mapping-map] 64 module-identifier=?)) 65