diff --git a/collects/data/info.rkt b/collects/data/info.rkt new file mode 100644 index 0000000000..5ca708fe72 --- /dev/null +++ b/collects/data/info.rkt @@ -0,0 +1,3 @@ +#lang setup/infotab +(define scribblings + '(("scribblings/data.scrbl" (multi-page) (experimental)))) diff --git a/collects/unstable/interval-map.rkt b/collects/data/interval-map.rkt similarity index 99% rename from collects/unstable/interval-map.rkt rename to collects/data/interval-map.rkt index de3ec855fc..64b242e008 100644 --- a/collects/unstable/interval-map.rkt +++ b/collects/data/interval-map.rkt @@ -3,7 +3,7 @@ (require racket/contract racket/promise racket/dict - unstable/skip-list) + data/skip-list) ;; NOTE-1 ;; I need to be able to split intervals. So I can either have diff --git a/collects/unstable/queue.rkt b/collects/data/queue.rkt similarity index 100% rename from collects/unstable/queue.rkt rename to collects/data/queue.rkt diff --git a/collects/data/scribblings/data.scrbl b/collects/data/scribblings/data.scrbl new file mode 100644 index 0000000000..baffcf6e7e --- /dev/null +++ b/collects/data/scribblings/data.scrbl @@ -0,0 +1,21 @@ +#lang scribble/doc +@(require scribble/base + scribble/manual + (for-syntax racket/base racket/path) + (for-label scribble/base)) + +@title[#:tag "data"]{Data Structures} + +@defmodule[data] + +This manual documents data structure libraries available in the +@racketmodname[data] collection. + +@local-table-of-contents[#:style 'immediate-only] + +@;{--------} + +@include-section["queue.scrbl"] +@include-section["skip-list.scrbl"] +@include-section["interval-map.scrbl"] + diff --git a/collects/unstable/scribblings/interval-map.scrbl b/collects/data/scribblings/interval-map.scrbl similarity index 95% rename from collects/unstable/scribblings/interval-map.scrbl rename to collects/data/scribblings/interval-map.scrbl index 128ad5c2c0..ed8f811950 100644 --- a/collects/unstable/scribblings/interval-map.scrbl +++ b/collects/data/scribblings/interval-map.scrbl @@ -1,7 +1,6 @@ #lang scribble/manual @(require scribble/eval - "utils.rkt" - (for-label unstable/interval-map + (for-label data/interval-map racket/contract racket/dict racket/base)) @@ -9,18 +8,18 @@ @title[#:tag "interval-map"]{Interval Maps} @(define the-eval (make-base-eval)) -@(the-eval '(require unstable/interval-map)) +@(the-eval '(require data/interval-map)) @(the-eval '(require racket/dict)) -@defmodule[unstable/interval-map] +@defmodule[data/interval-map] -@unstable[@author+email["Ryan Culpepper" "ryanc@racket-lang.org"]] +@author[@author+email["Ryan Culpepper" "ryanc@racket-lang.org"]] An interval-map is a mutable dictionary-like data structure where mappings are added by @emph{half-open} intervals and queried by discrete points. Interval-maps can be used with any total order. Internally, an interval-map uses a skip-list -(@racketmodname[unstable/skip-list]) of intervals for efficient query +(@racketmodname[data/skip-list]) of intervals for efficient query and update. Interval-maps implement the dictionary (@racketmodname[racket/dict]) diff --git a/collects/unstable/scribblings/queue.scrbl b/collects/data/scribblings/queue.scrbl similarity index 85% rename from collects/unstable/scribblings/queue.scrbl rename to collects/data/scribblings/queue.scrbl index 011a8442f3..b6f8ecd850 100644 --- a/collects/unstable/scribblings/queue.scrbl +++ b/collects/data/scribblings/queue.scrbl @@ -1,12 +1,12 @@ #lang scribble/manual -@(require scribble/eval "utils.rkt" (for-label racket unstable/queue)) -@(define qeval (eval/require 'unstable/queue)) +@(require scribble/eval "utils.rkt" (for-label racket data/queue)) +@(define qeval (eval/require 'data/queue)) @title{Imperative Queues} -@defmodule[unstable/queue] +@defmodule[data/queue] -@unstable[@author+email["Carl Eastlund" "cce@racket-lang.org"]] +@author[@author+email["Carl Eastlund" "cce@racket-lang.org"]] This module provides a simple mutable queue representation, first-in/first-out only. Operations on queues mutate it in a diff --git a/collects/unstable/scribblings/skip-list.scrbl b/collects/data/scribblings/skip-list.scrbl similarity index 95% rename from collects/unstable/scribblings/skip-list.scrbl rename to collects/data/scribblings/skip-list.scrbl index 50d5b63871..7151c37c74 100644 --- a/collects/unstable/scribblings/skip-list.scrbl +++ b/collects/data/scribblings/skip-list.scrbl @@ -1,7 +1,6 @@ #lang scribble/manual @(require scribble/eval - "utils.rkt" - (for-label unstable/skip-list + (for-label data/skip-list racket/contract racket/dict racket/base)) @@ -9,12 +8,12 @@ @title[#:tag "skip-list"]{Skip Lists} @(define the-eval (make-base-eval)) -@(the-eval '(require unstable/skip-list)) +@(the-eval '(require data/skip-list)) @(the-eval '(require racket/dict)) -@defmodule[unstable/skip-list] +@defmodule[data/skip-list] -@unstable[@author+email["Ryan Culpepper" "ryanc@racket-lang.org"]] +@author[@author+email["Ryan Culpepper" "ryanc@racket-lang.org"]] Skip lists are a simple, efficient data structure for mutable dictionaries with totally ordered keys. They were described in the diff --git a/collects/data/scribblings/utils.rkt b/collects/data/scribblings/utils.rkt new file mode 100644 index 0000000000..6cbde45fe3 --- /dev/null +++ b/collects/data/scribblings/utils.rkt @@ -0,0 +1,9 @@ +#lang at-exp racket/base +(require scribble/base scribble/manual scribble/core scribble/eval) +(provide eval/require) + +(define (eval/require . paths) + (let* ([e (make-base-eval)]) + (for ([path (in-list paths)]) + (e `(require ,path))) + e)) diff --git a/collects/unstable/skip-list.rkt b/collects/data/skip-list.rkt similarity index 100% rename from collects/unstable/skip-list.rkt rename to collects/data/skip-list.rkt diff --git a/collects/macro-debugger/syntax-browser/text.rkt b/collects/macro-debugger/syntax-browser/text.rkt index 839123c446..d96a4a2829 100644 --- a/collects/macro-debugger/syntax-browser/text.rkt +++ b/collects/macro-debugger/syntax-browser/text.rkt @@ -4,7 +4,7 @@ racket/gui drracket/arrow framework/framework - unstable/interval-map + data/interval-map unstable/gui/notify "interfaces.rkt") diff --git a/collects/tests/unstable/queue.rkt b/collects/tests/data/queue.rkt similarity index 96% rename from collects/tests/unstable/queue.rkt rename to collects/tests/data/queue.rkt index a9727e80b5..1174f1fef2 100644 --- a/collects/tests/unstable/queue.rkt +++ b/collects/tests/data/queue.rkt @@ -1,6 +1,6 @@ #lang racket/base -(require rackunit rackunit/text-ui unstable/queue "helpers.rkt") +(require rackunit rackunit/text-ui data/queue) (run-tests (test-suite "queue.ss" diff --git a/collects/unstable/scribblings/unstable.scrbl b/collects/unstable/scribblings/unstable.scrbl index 92063f9477..5995e260fe 100644 --- a/collects/unstable/scribblings/unstable.scrbl +++ b/collects/unstable/scribblings/unstable.scrbl @@ -86,7 +86,6 @@ Keep documentation and tests up to date. @include-section["planet.scrbl"] @include-section["port.scrbl"] @include-section["pretty.scrbl"] -@include-section["queue.scrbl"] @include-section["regexp.scrbl"] @include-section["require.scrbl"] @include-section["sandbox.scrbl"] @@ -108,8 +107,6 @@ Keep documentation and tests up to date. @include-section["sequence.scrbl"] @include-section["hash.scrbl"] @include-section["match.scrbl"] -@include-section["skip-list.scrbl"] -@include-section["interval-map.scrbl"] @include-section["generics.scrbl"] @include-section["markparam.scrbl"] @include-section["debug.scrbl"]