File: minimal.rkt

package info (click to toggle)
racket 6.1-4~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 91,948 kB
  • sloc: ansic: 265,507; sh: 32,501; asm: 12,747; lisp: 6,958; cpp: 2,906; makefile: 2,284; pascal: 2,134; exp: 484; python: 366; xml: 11
file content (28 lines) | stat: -rw-r--r-- 996 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#lang racket/base

(provide #%module-begin provide require rename-in rename-out prefix-in only-in all-from-out except-out except-in
         providing begin)

(require (for-syntax racket/base))

(define-for-syntax ts-mod 'typed-racket/typed-racket)

(define-syntax (providing stx)
  (syntax-case stx (libs from basics except)
    [(form (libs (except lb ex ...) ...) (basics b ...) (from spec id ...) ...)
     (datum->syntax
      stx
      (syntax->datum
       (with-syntax ([(b* ...) (generate-temporaries #'(b ...))]
                     [ts ts-mod])
         (syntax/loc
             stx
           (begin
             (require (except-in ts b ...))
             (require (only-in ts [b b*] ...))
             (require (except-in lb ex ...) ...)
             (require (only-in spec id ...) ...)
             (provide id ...) ...
             (provide (rename-out [b* b] ...))
             (provide (except-out (all-from-out ts) b* ...))
             (provide (all-from-out lb) ...))))))]))