diff --git a/collects/tests/racket/benchmarks/shootout/run.rkt b/collects/tests/racket/benchmarks/shootout/run.rkt index cb3d4f6517..d706151245 100644 --- a/collects/tests/racket/benchmarks/shootout/run.rkt +++ b/collects/tests/racket/benchmarks/shootout/run.rkt @@ -1,7 +1,6 @@ (module run mzscheme (require (only scheme/runtime-path define-runtime-path) racket/port - unstable/port mzlib/kw) (define input-map `( @@ -110,7 +109,7 @@ (if moments? (apply string-append ; like sumcol, but with floats (map (lambda (x) (string-append (number->string (exact->inexact x)) "\n")) - (read-all))) + (port->list))) (read-bytes 10000))))]) (with-output-to-file f (lambda () diff --git a/collects/tests/unstable/port.rkt b/collects/tests/unstable/port.rkt deleted file mode 100644 index 980a545aef..0000000000 --- a/collects/tests/unstable/port.rkt +++ /dev/null @@ -1,25 +0,0 @@ -#lang racket - -(require rackunit rackunit/text-ui unstable/port "helpers.rkt") - -(run-tests - (test-suite "port.rkt" - (test-suite "read-all" - (test-ok (check-equal? (read-all read (open-input-string "1 2 3")) - (list 1 2 3))) - (test-ok (check-equal? - (parameterize ([current-input-port - (open-input-string "1 2 3")]) - (read-all)) - (list 1 2 3)))) - (test-suite "read-all-syntax" - (test-ok (check-equal? - (syntax->datum - (read-all-syntax read-syntax (open-input-string "1 2 3"))) - (list 1 2 3))) - (test-ok (check-equal? - (syntax->datum - (parameterize ([current-input-port - (open-input-string "1 2 3")]) - (read-all-syntax))) - (list 1 2 3)))))) diff --git a/collects/typed-racket/optimizer/tool/report.rkt b/collects/typed-racket/optimizer/tool/report.rkt index ed66f1a725..5e91af7258 100644 --- a/collects/typed-racket/optimizer/tool/report.rkt +++ b/collects/typed-racket/optimizer/tool/report.rkt @@ -1,7 +1,7 @@ #lang racket/base (require racket/class racket/gui/base racket/match racket/port racket/list - unstable/syntax unstable/port racket/sandbox + unstable/syntax racket/sandbox typed-racket/optimizer/logging (prefix-in tr: typed-racket/typed-reader)) diff --git a/collects/unstable/port.rkt b/collects/unstable/port.rkt deleted file mode 100644 index 90ed4b0358..0000000000 --- a/collects/unstable/port.rkt +++ /dev/null @@ -1,36 +0,0 @@ -#lang racket/base -(require racket/match - racket/contract/base - syntax/srcloc) - -(define (port->srcloc port [source (object-name port)] [span 0]) - (let*-values ([(line col pos) (port-next-location port)]) - (make-srcloc source line col pos span))) - -(define read-all - (case-lambda - [() (read-all read)] - [(reader) - (let loop () - (match (reader) - [(? eof-object?) null] - [term (cons term (loop))]))] - [(reader port) - (parameterize ([current-input-port port]) - (read-all reader))])) - -(define read-all-syntax - (case-lambda - [() (read-all-syntax read-syntax)] - [(reader) (read-all-syntax reader (current-input-port))] - [(reader port) - (define start (port->srcloc port)) - (define terms (read-all reader port)) - (define end (port->srcloc port)) - (datum->syntax #f terms (build-source-location-list start end))])) - -(provide/contract - [read-all (->* [] [(-> any/c) input-port?] list?)] - [read-all-syntax - (->* [] [(-> (or/c syntax? eof-object?)) input-port?] - (syntax/c list?))]) diff --git a/collects/unstable/scribblings/port.scrbl b/collects/unstable/scribblings/port.scrbl deleted file mode 100644 index fbc95326be..0000000000 --- a/collects/unstable/scribblings/port.scrbl +++ /dev/null @@ -1,53 +0,0 @@ -#lang scribble/manual -@(require scribble/eval "utils.rkt" (for-label racket unstable/port)) - -@(define the-eval (make-base-eval)) -@(the-eval '(require unstable/port)) - -@title{Ports} -@unstable[@author+email["Carl Eastlund" "cce@racket-lang.org"]] - -@defmodule[unstable/port] - -This module provides tools for port I/O. - -@defproc[(read-all [reader (-> any/c) read] - [port input-port? (current-input-port)]) - list?]{ - -This function produces a list of all the values produced by calling -@racket[(reader)] while @racket[current-input-port] is set to @racket[port], up -until it produces @racket[eof]. - -@defexamples[ -#:eval the-eval -(read-all read (open-input-string "1 2 3")) -(parameterize ([current-input-port (open-input-string "a b c")]) - (read-all)) -] - -} - -@defproc[(read-all-syntax [reader (-> (or/c syntax? eof-object?)) read] - [port input-port? (current-input-port)]) - (syntax/c list?)]{ - -This function produces a syntax object containing a list of all the syntax -objects produced by calling @racket[(reader)] while @racket[current-input-port] -is set to @racket[port], up until it produces @racket[eof]. The source location -of the result spans the entire portion of the port that was read. - -@defexamples[ -#:eval the-eval -(define port1 (open-input-string "1 2 3")) -(port-count-lines! port1) -(read-all-syntax read-syntax port1) -(define port2 (open-input-string "a b c")) -(port-count-lines! port2) -(parameterize ([current-input-port port2]) - (read-all-syntax)) -] - -} - -@(close-eval the-eval) diff --git a/collects/unstable/scribblings/unstable.scrbl b/collects/unstable/scribblings/unstable.scrbl index 76b87e07c8..e652d58dfd 100644 --- a/collects/unstable/scribblings/unstable.scrbl +++ b/collects/unstable/scribblings/unstable.scrbl @@ -94,7 +94,6 @@ Keep documentation and tests up to date. @include-section["markparam.scrbl"] @include-section["match.scrbl"] @include-section["parameter-group.scrbl"] -@include-section["port.scrbl"] @include-section["pretty.scrbl"] @include-section["sequence.scrbl"] @include-section["string.scrbl"] diff --git a/collects/unstable/tests/test-docs-complete.rkt b/collects/unstable/tests/test-docs-complete.rkt index 82effc3e83..b49a4ce892 100644 --- a/collects/unstable/tests/test-docs-complete.rkt +++ b/collects/unstable/tests/test-docs-complete.rkt @@ -6,7 +6,6 @@ (check-docs (quote unstable/string)) (check-docs (quote unstable/sequence)) (check-docs (quote unstable/pretty)) -(check-docs (quote unstable/port)) (check-docs (quote unstable/match)) (check-docs (quote unstable/markparam) #:skip #rx"^deserialize-info:") (check-docs (quote unstable/list))