From efe8628e2c705aa016a032b1e192296f61de2755 Mon Sep 17 00:00:00 2001 From: Jack Firth Date: Tue, 18 Aug 2015 13:41:28 -0700 Subject: [PATCH] Fix doc module references --- lens/hash-pick.scrbl | 6 ++---- lens/hash.scrbl | 2 +- lens/join.scrbl | 12 +++++------- lens/list.scrbl | 10 ++++------ lens/stream.scrbl | 2 +- lens/string.scrbl | 6 +++--- lens/vector.scrbl | 8 ++++---- 7 files changed, 20 insertions(+), 26 deletions(-) diff --git a/lens/hash-pick.scrbl b/lens/hash-pick.scrbl index 3881a69..92c066a 100644 --- a/lens/hash-pick.scrbl +++ b/lens/hash-pick.scrbl @@ -1,16 +1,14 @@ #lang scribble/manual -@(require lens/doc-util/main) +@(require "doc-util/main.rkt") @title{Viewing a subset of a hash table by key} -@defmodule[unstable/lens/hash-pick] - @defproc[(hash-pick-lens [key any/c] ...) lens?]{ Creates a lens that views a subset of the target hash-table with the given @racket[key]s. The view, is another hash-table with only the given keys and their corrosponding values in the target hash-table. -@lenses-unstable-examples[ +@lenses-examples[ (lens-view (hash-pick-lens 'a 'c) (hash 'a 1 'b 2 'c 3)) (lens-set (hash-pick-lens 'a 'c) (hash 'a 1 'b 2 'c 3) (hash 'a 4 'c 5)) ]} diff --git a/lens/hash.scrbl b/lens/hash.scrbl index cf379f2..198f307 100644 --- a/lens/hash.scrbl +++ b/lens/hash.scrbl @@ -1,6 +1,6 @@ #lang scribble/manual -@(require "doc-util/main") +@(require "doc-util/main.rkt") @title{Hash Lenses} diff --git a/lens/join.scrbl b/lens/join.scrbl index 42574c0..481d3a4 100644 --- a/lens/join.scrbl +++ b/lens/join.scrbl @@ -1,19 +1,17 @@ #lang scribble/manual -@(require lens/doc-util/main) +@(require "doc-util/main.rkt") @title{Joining Lenses} -@defmodule[unstable/lens/join] - @defproc[(lens-join/list [lens lens?] ...) lens?]{ Constructs a lens that combines the view of each @racket[lens] into a list of views. This lens can be used to view and set a list of values in a single target. If any of the lenses share views, then when setting the later lenses override the earlier ones. - @lenses-unstable-examples[ + @lenses-examples[ (define first-third-fifth-lens (lens-join/list first-lens third-lens @@ -28,7 +26,7 @@ as the hash keys. In the same manner as @racket[lens-join/list], if lenses share views later lenses take precedence when setting. - @lenses-unstable-examples[ + @lenses-examples[ (define a-b-lens (lens-join/hash 'a first-lens 'b third-lens)) (lens-view a-b-lens '(1 2 3)) @@ -37,7 +35,7 @@ @defproc[(lens-join/vector [lens lens?] ...) lens?]{ Like @racket[lens-join/list], except the view is a vector, not a list. - @lenses-unstable-examples[ + @lenses-examples[ (define vector-first-third-fifth-lens (lens-join/vector first-lens third-lens @@ -49,7 +47,7 @@ @defproc[(lens-join/string [lens lens?] ...) lens?]{ Like @racket[lens-join/list], except the view is a string, not a list. Each @racket[lens] argument must return a @racket[char?] as a view. - @lenses-unstable-examples[ + @lenses-examples[ (define string-first-third-fifth-lens (lens-join/string first-lens third-lens diff --git a/lens/list.scrbl b/lens/list.scrbl index 0a6be1a..29b4280 100644 --- a/lens/list.scrbl +++ b/lens/list.scrbl @@ -1,16 +1,14 @@ #lang scribble/manual -@(require lens/doc-util/main) +@(require "doc-util/main.rkt") -@title{List Lenses} - -@defmodule[unstable/lens/list] +@title{Nested List Lenses} @defproc[(list-ref-nested-lens [index exact-nonnegative-integer?] ...) lens?]{ Constructs a lens that views into a tree made from nested lists. Indexing starts from zero in the same was as @racket[list-ref-lens]. - @lenses-unstable-examples[ + @lenses-examples[ (define first-of-second-lens (list-ref-nested-lens 1 0)) (lens-view first-of-second-lens '(1 (a b c) 2 3)) (lens-set first-of-second-lens '(1 (a b c) 2 3) 'foo) @@ -19,7 +17,7 @@ @defproc[(list-refs-lens [index exact-nonnegative-integer?] ...) lens?]{ Constructs a lens that views each @racket[index] item in a list. Indexing starts from zero in the same was as @racket[list-ref-lens]. - @lenses-unstable-examples[ + @lenses-examples[ (define 1-5-6-lens (list-refs-lens 1 5 6)) (lens-view 1-5-6-lens '(a b c d e f g)) (lens-set 1-5-6-lens '(a b c d e f g) '(1 2 3)) diff --git a/lens/stream.scrbl b/lens/stream.scrbl index d31bc72..a99c0a9 100644 --- a/lens/stream.scrbl +++ b/lens/stream.scrbl @@ -1,6 +1,6 @@ #lang scribble/manual -@(require "doc-util/main") +@(require "doc-util/main.rkt") @title{Stream Lenses} diff --git a/lens/string.scrbl b/lens/string.scrbl index e976ef2..5cf98c1 100644 --- a/lens/string.scrbl +++ b/lens/string.scrbl @@ -1,12 +1,12 @@ #lang scribble/manual -@(require lens/doc-util/main) +@(require "doc-util/main.rkt") @title{String Lenses} @defproc[(string-ref-lens [i exact-nonnegative-integer?]) lens?]{ Returns a lens for viewing the @racket[i]th character of a string. -@lenses-unstable-examples[ +@lenses-examples[ (lens-view (string-ref-lens 2) "abcdef") (lens-set (string-ref-lens 2) "abcdef" #\C) ]} @@ -14,7 +14,7 @@ Returns a lens for viewing the @racket[i]th character of a string. @defproc[(string-pick-lens [i exact-nonnegative-integer?]) lens?]{ Like @racket[list-refs-lens], but for strings. Equivalent to @racket[(lens-join/string (string-ref-lens i) ...)]. -@lenses-unstable-examples[ +@lenses-examples[ (define 1-5-6-lens (string-pick-lens 1 5 6)) (lens-view 1-5-6-lens "abcdefg") (lens-set 1-5-6-lens "abcdefg" "BFG") diff --git a/lens/vector.scrbl b/lens/vector.scrbl index 4ed69b7..4893ded 100644 --- a/lens/vector.scrbl +++ b/lens/vector.scrbl @@ -1,12 +1,12 @@ #lang scribble/manual -@(require lens/doc-util/main) +@(require "doc-util/main.rkt") @title{Vector lenses} @defproc[(vector-ref-lens [i exact-nonnegative-integer?]) lens?]{ Returns a lens that views an element of a vector. -@lenses-unstable-examples[ +@lenses-examples[ (lens-view (vector-ref-lens 2) #(a b c d)) (lens-set (vector-ref-lens 2) #(a b c d) "sea") ]} @@ -14,7 +14,7 @@ Returns a lens that views an element of a vector. @defproc[(vector-ref-nested-lens [i exact-nonnegative-integer?] ...) lens?]{ Like @racket[list-ref-nested-lens], but for vectors. Equivalent to @racket[(lens-thrush (vector-ref-lens i) ...)]. -@lenses-unstable-examples[ +@lenses-examples[ (lens-view (vector-ref-nested-lens 2 1) #(a b #(s i) d)) (lens-set (vector-ref-nested-lens 2 1) #(a b #(s i) d) "eye") ]} @@ -22,7 +22,7 @@ Equivalent to @racket[(lens-thrush (vector-ref-lens i) ...)]. @defproc[(vector-pick-lens [i exact-nonnegative-integer?] ...) lens?]{ Like @racket[list-refs-lens], but for vectors. Equivalent to @racket[(lens-join/vector (vector-ref-lens i) ...)]. -@lenses-unstable-examples[ +@lenses-examples[ (define 1-5-6-lens (vector-pick-lens 1 5 6)) (lens-view 1-5-6-lens #(a b c d e f g)) (lens-set 1-5-6-lens #(a b c d e f g) #(1 2 3))