moved unstable/{location,srcloc} to syntax collection

fixed bugs in unstable/wrapc
This commit is contained in:
Ryan Culpepper 2011-04-07 21:00:06 -06:00
parent f49412add8
commit 7828a7bfa7
20 changed files with 40 additions and 40 deletions

View File

@ -3,7 +3,7 @@
(provide define/contract) (provide define/contract)
(require (for-syntax racket/base (require (for-syntax racket/base
unstable/srcloc syntax/srcloc
(prefix-in a: racket/contract/private/helpers)) (prefix-in a: racket/contract/private/helpers))
(only-in racket/contract/private/base contract)) (only-in racket/contract/private/base contract))

View File

@ -10,7 +10,7 @@
syntax/struct syntax/struct
scheme/struct-info scheme/struct-info
syntax/stx syntax/stx
unstable/location syntax/location
"private/unit-contract-syntax.rkt" "private/unit-contract-syntax.rkt"
"private/unit-compiletime.rkt" "private/unit-compiletime.rkt"
"private/unit-syntax.rkt")) "private/unit-syntax.rkt"))
@ -18,7 +18,7 @@
(require mzlib/etc (require mzlib/etc
racket/contract/base racket/contract/base
scheme/stxparam scheme/stxparam
unstable/location syntax/location
"private/unit-contract.rkt" "private/unit-contract.rkt"
"private/unit-keywords.rkt" "private/unit-keywords.rkt"
"private/unit-runtime.rkt" "private/unit-runtime.rkt"

View File

@ -5,7 +5,7 @@
"guts.rkt" "guts.rkt"
"opt.rkt" "opt.rkt"
"blame.rkt" "blame.rkt"
unstable/location syntax/location
(for-syntax racket/base (for-syntax racket/base
racket/stxparam-exptime racket/stxparam-exptime
"arr-i-parse.rkt" "arr-i-parse.rkt"

View File

@ -15,8 +15,8 @@ improve method arity mismatch contract violation error messages?
(require (for-syntax racket/base syntax/name) (require (for-syntax racket/base syntax/name)
racket/stxparam racket/stxparam
unstable/srcloc syntax/srcloc
unstable/location syntax/location
"guts.rkt" "guts.rkt"
"blame.rkt" "blame.rkt"
"prop.rkt" "prop.rkt"

View File

@ -1,6 +1,6 @@
#lang racket/base #lang racket/base
(require unstable/srcloc racket/pretty) (require syntax/srcloc racket/pretty)
(provide blame? (provide blame?
make-blame make-blame

View File

@ -1,6 +1,6 @@
#lang racket/base #lang racket/base
(require "guts.rkt" "blame.rkt" "prop.rkt" unstable/srcloc) (require "guts.rkt" "blame.rkt" "prop.rkt" syntax/srcloc)
(provide make-proj-contract (provide make-proj-contract
raise-contract-error raise-contract-error

View File

@ -12,8 +12,8 @@
racket/contract/exists racket/contract/exists
"guts.rkt" "guts.rkt"
(for-syntax unstable/dirs) (for-syntax unstable/dirs)
unstable/location syntax/location
unstable/srcloc) syntax/srcloc)
(define-syntax (verify-contract stx) (define-syntax (verify-contract stx)
(syntax-case stx () (syntax-case stx ()

View File

@ -14,7 +14,7 @@
(prefix-in a: "private/helpers.rkt")) (prefix-in a: "private/helpers.rkt"))
racket/splicing racket/splicing
racket/stxparam racket/stxparam
unstable/location syntax/location
"private/arrow.rkt" "private/arrow.rkt"
"private/base.rkt" "private/base.rkt"
"private/guts.rkt") "private/guts.rkt")

View File

@ -1,10 +1,8 @@
#lang racket/base #lang racket/base
(require syntax/srcloc
(require unstable/srcloc
(for-syntax racket/base (for-syntax racket/base
unstable/srcloc syntax/srcloc
unstable/dirs)) unstable/dirs))
(provide quote-srcloc (provide quote-srcloc
quote-source-file quote-source-file
quote-line-number quote-line-number

View File

@ -1,6 +1,6 @@
#lang racket/base #lang racket/base
(require racket/contract/base (require racket/contract/base
unstable/location syntax/location
(for-syntax racket/base (for-syntax racket/base
racket/syntax racket/syntax
"../private/minimatch.rkt" "../private/minimatch.rkt"

View File

@ -1,13 +1,16 @@
#lang scribble/manual #lang scribble/manual
@(require scribble/eval "utils.rkt" (for-label racket/base unstable/srcloc unstable/location)) @(require scribble/eval
(for-label racket/base
syntax/srcloc
syntax/location))
@(define unsyntax #f) @(define unsyntax #f)
@(define (new-evaluator) @(define (new-evaluator)
(let* ([e (make-base-eval)]) (let* ([e (make-base-eval)])
(e '(require (for-syntax racket/base) (e '(require (for-syntax racket/base)
unstable/srcloc syntax/srcloc
unstable/location)) syntax/location))
e)) e))
@(define evaluator (new-evaluator)) @(define evaluator (new-evaluator))
@ -17,15 +20,15 @@
@title{Source Locations} @title{Source Locations}
@author[@author+email["Carl Eastlund" "cce@ccs.neu.edu"]]
There are two libraries in this collection for dealing with source locations; There are two libraries in this collection for dealing with source locations;
one for manipulating representations of them, and the other for quoting the one for manipulating representations of them, and the other for quoting the
location of a particular piece of source code. location of a particular piece of source code.
@section[#:tag "srcloc"]{Representations} @section[#:tag "srcloc"]{Representations}
@defmodule[unstable/srcloc] @defmodule[syntax/srcloc]
@unstable[@author+email["Carl Eastlund" "cce@ccs.neu.edu"]]
This module defines utilities for manipulating representations of source This module defines utilities for manipulating representations of source
locations, including both @racket[srcloc] structures and all the values accepted locations, including both @racket[srcloc] structures and all the values accepted
@ -216,9 +219,7 @@ The first produces a string describing the source location; the second appends
@section[#:tag "location"]{Quoting} @section[#:tag "location"]{Quoting}
@defmodule[unstable/location] @defmodule[syntax/location]
@unstable[@author+email["Carl Eastlund" "cce@ccs.neu.edu"]]
This module defines macros that evaluate to various aspects of their own source This module defines macros that evaluate to various aspects of their own source
location. location.
@ -304,7 +305,7 @@ programmatically, such as via @racket[dynamic-require].
@defexamples[#:eval (new-evaluator) @defexamples[#:eval (new-evaluator)
(module A racket (module A racket
(require unstable/location) (require syntax/location)
(define-syntax-rule (name) (quote-module-name)) (define-syntax-rule (name) (quote-module-name))
(define-syntax-rule (path) (quote-module-path)) (define-syntax-rule (path) (quote-module-path))
(define a-name (name)) (define a-name (name))
@ -314,7 +315,7 @@ programmatically, such as via @racket[dynamic-require].
a-name a-name
a-path a-path
(module B racket (module B racket
(require unstable/location) (require syntax/location)
(require 'A) (require 'A)
(define b-name (name)) (define b-name (name))
(define b-path (path)) (define b-path (path))

View File

@ -22,4 +22,6 @@
@include-section["parse.scrbl"] @include-section["parse.scrbl"]
@include-section["srcloc.scrbl"]
@index-section[] @index-section[]

View File

@ -1,6 +1,6 @@
#lang racket/base #lang racket/base
;; Unstable library by: Carl Eastlund <cce@ccs.neu.edu> ;; Library by: Carl Eastlund <cce@ccs.neu.edu>
;; intended for use in racket/contract, so don't try to add contracts! ;; intended for use in racket/contract, so don't try to add contracts!
(provide (provide

View File

@ -22,7 +22,7 @@
racket/dict racket/dict
(for-template (for-template
"internal-forms.rkt" "internal-forms.rkt"
unstable/location syntax/location
mzlib/contract mzlib/contract
scheme/base)) scheme/base))

View File

@ -1,7 +1,7 @@
#lang scheme/base #lang scheme/base
(require scheme/contract (require scheme/contract
unstable/location syntax/location
(for-syntax scheme/base (for-syntax scheme/base
syntax/parse syntax/parse
(prefix-in tr: "../private/typed-renaming.rkt"))) (prefix-in tr: "../private/typed-renaming.rkt")))

View File

@ -22,8 +22,8 @@
(require racket/block (require racket/block
racket/match racket/match
unstable/pretty unstable/pretty
unstable/srcloc syntax/srcloc
unstable/location syntax/location
racket/syntax racket/syntax
(for-syntax racket/base racket/match syntax/parse racket/syntax)) (for-syntax racket/base racket/match syntax/parse racket/syntax))

View File

@ -1,7 +1,7 @@
#lang racket/base #lang racket/base
(require racket/match (require racket/match
racket/contract racket/contract
unstable/srcloc) syntax/srcloc)
#| #|
Ryan: Ryan:

View File

@ -90,7 +90,6 @@ Keep documentation and tests up to date.
@include-section["sandbox.scrbl"] @include-section["sandbox.scrbl"]
@include-section["set.scrbl"] @include-section["set.scrbl"]
@include-section["sexp-diff.scrbl"] @include-section["sexp-diff.scrbl"]
@include-section["srcloc.scrbl"]
@include-section["string.scrbl"] @include-section["string.scrbl"]
@include-section["struct.scrbl"] @include-section["struct.scrbl"]
@include-section["syntax.scrbl"] @include-section["syntax.scrbl"]

View File

@ -6,7 +6,7 @@
(for-label racket/base (for-label racket/base
racket/contract racket/contract
unstable/wrapc unstable/wrapc
unstable/syntax)) racket/syntax))
@(begin @(begin
(define the-eval (make-base-eval)) (define the-eval (make-base-eval))
@ -66,7 +66,7 @@ is an identifier) or the @scheme[context] argument, and the module
where it is @emph{defined} is used as the negative blame location. If where it is @emph{defined} is used as the negative blame location. If
neither an identifier @scheme[macro-name] nor a @scheme[context] neither an identifier @scheme[macro-name] nor a @scheme[context]
argument is given, the location is @scheme["unknown"].} argument is given, the location is @scheme["unknown"].}
@item{If the argument is @scheme['same-as-use-site], the module being @item{If the argument is @scheme['use-site], the module being
expanded is used.} expanded is used.}
@item{If the argument is @scheme['unknown], the blame label is @item{If the argument is @scheme['unknown], the blame label is
@scheme["unknown"].} @scheme["unknown"].}

View File

@ -2,8 +2,8 @@
(require racket/contract/base (require racket/contract/base
(for-template racket/base (for-template racket/base
racket/contract/base racket/contract/base
unstable/location) syntax/location)
unstable/srcloc syntax/srcloc
racket/syntax) racket/syntax)
(provide/contract (provide/contract
@ -12,7 +12,7 @@
(#:positive (or/c syntax? string? module-path-index? (#:positive (or/c syntax? string? module-path-index?
'from-macro 'use-site 'unknown) 'from-macro 'use-site 'unknown)
#:negative (or/c syntax? string? module-path-index? #:negative (or/c syntax? string? module-path-index?
'from-macro 'same-as-use-site 'unknown) 'from-macro 'use-site 'unknown)
#:name (or/c identifier? symbol? string? #f) #:name (or/c identifier? symbol? string? #f)
#:macro (or/c identifier? symbol? string? #f) #:macro (or/c identifier? symbol? string? #f)
#:context (or/c syntax? #f)) #:context (or/c syntax? #f))
@ -76,7 +76,7 @@
(cond [(string? source) source] (cond [(string? source) source]
[(syntax? source) (source-location->string source)] [(syntax? source) (source-location->string source)]
[(module-path-index? source) [(module-path-index? source)
;; FIXME: share with unstable/location ?? ;; FIXME: share with syntax/location ??
(let ([name (resolved-module-path-name (let ([name (resolved-module-path-name
(module-path-index-resolve source))]) (module-path-index-resolve source))])
(cond [(path? name) (format "(file ~s)" (path->string name))] (cond [(path? name) (format "(file ~s)" (path->string name))]