From 654c0c7ece942ae70fd11bfab4d6e3cc1043344b Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Sat, 18 Jul 2015 00:13:36 -0400 Subject: [PATCH] fix doc stuff --- lens/doc-util/lenses-examples.rkt | 6 +++--- lens/doc-util/main.rkt | 2 ++ unstable/lens/arrow.scrbl | 6 +++--- unstable/lens/hash-pluck.scrbl | 4 ++-- unstable/lens/string.scrbl | 6 ++---- unstable/lens/vector.scrbl | 8 +++----- 6 files changed, 15 insertions(+), 17 deletions(-) diff --git a/lens/doc-util/lenses-examples.rkt b/lens/doc-util/lenses-examples.rkt index 7f16e4f..cdbade8 100644 --- a/lens/doc-util/lenses-examples.rkt +++ b/lens/doc-util/lenses-examples.rkt @@ -18,10 +18,10 @@ (define-examples-form lenses-examples - lens racket/list) + lens racket/list racket/stream) (define-examples-form lenses-applicable-examples - lens/applicable racket/list) + lens/applicable racket/list racket/stream) (define-examples-form lenses-unstable-examples - lens unstable/lens racket/list) + lens unstable/lens racket/list racket/stream) diff --git a/lens/doc-util/main.rkt b/lens/doc-util/main.rkt index 2bb00ad..c61108a 100644 --- a/lens/doc-util/main.rkt +++ b/lens/doc-util/main.rkt @@ -7,6 +7,7 @@ unstable/lens racket/base racket/list + racket/stream racket/contract ) (for-syntax racket/base @@ -24,6 +25,7 @@ unstable/lens racket/base racket/list + racket/stream racket/contract )) (for-syntax (all-from-out diff --git a/unstable/lens/arrow.scrbl b/unstable/lens/arrow.scrbl index 4134ae8..e479352 100644 --- a/unstable/lens/arrow.scrbl +++ b/unstable/lens/arrow.scrbl @@ -16,7 +16,7 @@ switched, so that the @racket[target] comes first and the @racket[(lens-view (lens-thrush lens ...) target)], but can be more efficient. The function @racket[lens-view~>] is provided as a shorter version. -@lenses-examples[ +@lenses-unstable-examples[ (lens-view/thrush '(a b ((c d) e f) g) third-lens first-lens second-lens) (lens-view~> '(a b ((c d) e f) g) third-lens first-lens second-lens) ]} @@ -28,7 +28,7 @@ which again are combined into a nested lens. @racket[(lens-set/thrush target lens ... #:-> new-view)] is equivalent to @racket[(lens-set (lens-thrush lens ...) target new-view)], and @racket[lens-set~>] is the shorter version. -@lenses-examples[ +@lenses-unstable-examples[ (lens-set/thrush '(a b ((c d) e f) g) third-lens first-lens second-lens #:-> "sea") (lens-set~> '(a b ((c d) e f) g) third-lens first-lens second-lens #:-> "sea") ]} @@ -45,7 +45,7 @@ just like @racket[lens-set/thrush]. equivalent to @racket[(lens-transform (lens-thrush lens ...) target transformer)], and @racket[lens-transform~>] is the shorter verison. -@lenses-examples[ +@lenses-unstable-examples[ (lens-transform/thrush '(a b ((c d) e f) g) third-lens first-lens second-lens #:-> symbol->string) (lens-transform~> '(a b ((c d) e f) g) third-lens first-lens second-lens #:-> symbol->string) ]} diff --git a/unstable/lens/hash-pluck.scrbl b/unstable/lens/hash-pluck.scrbl index 9d815f7..07a4299 100644 --- a/unstable/lens/hash-pluck.scrbl +++ b/unstable/lens/hash-pluck.scrbl @@ -11,6 +11,6 @@ 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[ - (lens-view (hash-slice-lens 'a 'c) (hash 'a 1 'b 2 'c 3)) - (lens-set (hash-slice-lens 'a 'c) (hash 'a 1 'b 2 'c 3) (hash 'a 4 'c 5)) + (lens-view (hash-pluck-lens 'a 'c) (hash 'a 1 'b 2 'c 3)) + (lens-set (hash-pluck-lens 'a 'c) (hash 'a 1 'b 2 'c 3) (hash 'a 4 'c 5)) ]} diff --git a/unstable/lens/string.scrbl b/unstable/lens/string.scrbl index e4fe2f8..fafaac3 100644 --- a/unstable/lens/string.scrbl +++ b/unstable/lens/string.scrbl @@ -16,8 +16,6 @@ Like @racket[list-refs-lens], but for strings. Equivalent to @racket[(lens-join/string (string-ref-lens i) ...)]. @lenses-unstable-examples[ (define 1-5-6-lens (string-pluck-lens 1 5 6)) - (check-equal? (lens-view 1-5-6-lens "abcdefg") - "bfg") - (check-equal? (lens-set 1-5-6-lens "abcdefg" "BFG") - "aBcdeFG") + (lens-view 1-5-6-lens "abcdefg") + (lens-set 1-5-6-lens "abcdefg" "BFG") ]} diff --git a/unstable/lens/vector.scrbl b/unstable/lens/vector.scrbl index 8730b11..7edabd4 100644 --- a/unstable/lens/vector.scrbl +++ b/unstable/lens/vector.scrbl @@ -8,7 +8,7 @@ Returns a lens that views an element of a vector. @lenses-unstable-examples[ (lens-view (vector-ref-lens 2) #(a b c d)) - (lens-set (vector-ref lens 2) #(a b c d) "sea") + (lens-set (vector-ref-lens 2) #(a b c d) "sea") ]} @defproc[(vector-ref-nested-lens [i exact-nonnegative-integer?] ...) lens?]{ @@ -24,8 +24,6 @@ Like @racket[list-refs-lens], but for vectors. Equivalent to @racket[(lens-join/vector (vector-ref-lens i) ...)]. @lenses-unstable-examples[ (define 1-5-6-lens (vector-pluck-lens 1 5 6)) - (check-equal? (lens-view 1-5-6-lens #(a b c d e f g)) - #(b f g)) - (check-equal? (lens-set 1-5-6-lens #(a b c d e f g) #(1 2 3)) - #(a 1 c d e 2 3)) + (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)) ]}