removed unstable/require

This commit is contained in:
Ryan Culpepper 2011-12-17 22:43:25 -07:00
parent a4c6c7cfce
commit 52aefa6e35
4 changed files with 0 additions and 83 deletions

View File

@ -1,46 +0,0 @@
#lang racket/base
(require (for-syntax racket/base
racket/require-transform
racket/provide-transform
syntax/parse))
(provide require/provide
quote-require)
(define-syntax-rule (require/provide spec ...)
(begin
(define-syntax imports (box #f))
(require (box-require imports (combine-in spec ...)))
(provide (box-provide imports))))
(define-syntax (quote-require stx)
(syntax-parse stx
[(_ spec:expr ...)
(let*-values ([(imports sources)
(expand-import (syntax/loc stx (combine-in spec ...)))])
(with-syntax ([(name ...) (map import-local-id imports)])
(syntax/loc stx '(name ...))))]))
(define-syntax box-require
(make-require-transformer
(lambda (stx)
(syntax-parse stx
[(_ ibox spec:expr)
#:declare ibox (static box? "mutable box for expanded import specs")
(let-values ([(imports sources) (expand-import #'spec)])
(set-box! (syntax-local-value #'ibox) imports)
(values imports sources))]))))
(define-for-syntax (import->export i)
(make-export (import-local-id i)
(syntax-e (import-local-id i))
(import-mode i)
#f
(import-orig-stx i)))
(define-syntax box-provide
(make-provide-transformer
(lambda (stx modes)
(syntax-parse stx
[(_ ibox)
#:declare ibox (static box? "mutable box for expanded import specs")
(map import->export (unbox (syntax-local-value #'ibox)))]))))

View File

@ -1,35 +0,0 @@
#lang scribble/manual
@(require scribble/eval "utils.rkt" (for-label racket unstable/require))
@(define the-eval (make-base-eval))
@(the-eval '(require unstable/require))
@title{Requiring Modules}
@defmodule[unstable/require]
This module provides tools for importing from modules.
@defform[(require/provide module-path ...)]{
Re-exports all bindings provided by each @racket[module-path]. Equivalent to:
@racketblock[
(require module-path ...)
(provide (all-from-out module-path ...))
]
}
@defform[(quote-require require-spec ...)]{
Produces the names exported by the @racket[require-spec]s as a list of symbols.
@examples[
#:eval the-eval
(quote-require racket/bool racket/function)
]
}
@(close-eval the-eval)

View File

@ -95,7 +95,6 @@ Keep documentation and tests up to date.
@include-section["net.scrbl"]
@include-section["port.scrbl"]
@include-section["pretty.scrbl"]
@include-section["require.scrbl"]
@include-section["sequence.scrbl"]
@include-section["string.scrbl"]
@include-section["struct.scrbl"]

View File

@ -5,7 +5,6 @@
(check-docs (quote unstable/struct))
(check-docs (quote unstable/string))
(check-docs (quote unstable/sequence))
(check-docs (quote unstable/require))
(check-docs (quote unstable/prop-contract))
(check-docs (quote unstable/pretty))
(check-docs (quote unstable/port))