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)
(require (for-syntax racket/base
unstable/srcloc
syntax/srcloc
(prefix-in a: racket/contract/private/helpers))
(only-in racket/contract/private/base contract))

View File

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

View File

@ -5,7 +5,7 @@
"guts.rkt"
"opt.rkt"
"blame.rkt"
unstable/location
syntax/location
(for-syntax racket/base
racket/stxparam-exptime
"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)
racket/stxparam
unstable/srcloc
unstable/location
syntax/srcloc
syntax/location
"guts.rkt"
"blame.rkt"
"prop.rkt"

View File

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

View File

@ -1,6 +1,6 @@
#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
raise-contract-error

View File

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

View File

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

View File

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

View File

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

View File

@ -1,13 +1,16 @@
#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 (new-evaluator)
(let* ([e (make-base-eval)])
(e '(require (for-syntax racket/base)
unstable/srcloc
unstable/location))
syntax/srcloc
syntax/location))
e))
@(define evaluator (new-evaluator))
@ -17,15 +20,15 @@
@title{Source Locations}
@author[@author+email["Carl Eastlund" "cce@ccs.neu.edu"]]
There are two libraries in this collection for dealing with source locations;
one for manipulating representations of them, and the other for quoting the
location of a particular piece of source code.
@section[#:tag "srcloc"]{Representations}
@defmodule[unstable/srcloc]
@unstable[@author+email["Carl Eastlund" "cce@ccs.neu.edu"]]
@defmodule[syntax/srcloc]
This module defines utilities for manipulating representations of source
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}
@defmodule[unstable/location]
@unstable[@author+email["Carl Eastlund" "cce@ccs.neu.edu"]]
@defmodule[syntax/location]
This module defines macros that evaluate to various aspects of their own source
location.
@ -304,7 +305,7 @@ programmatically, such as via @racket[dynamic-require].
@defexamples[#:eval (new-evaluator)
(module A racket
(require unstable/location)
(require syntax/location)
(define-syntax-rule (name) (quote-module-name))
(define-syntax-rule (path) (quote-module-path))
(define a-name (name))
@ -314,7 +315,7 @@ programmatically, such as via @racket[dynamic-require].
a-name
a-path
(module B racket
(require unstable/location)
(require syntax/location)
(require 'A)
(define b-name (name))
(define b-path (path))

View File

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

View File

@ -1,6 +1,6 @@
#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!
(provide

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,7 +6,7 @@
(for-label racket/base
racket/contract
unstable/wrapc
unstable/syntax))
racket/syntax))
@(begin
(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
neither an identifier @scheme[macro-name] nor a @scheme[context]
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.}
@item{If the argument is @scheme['unknown], the blame label is
@scheme["unknown"].}

View File

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