diff --git a/pkgs/racket-doc/scribblings/reference/sequences.scrbl b/pkgs/racket-doc/scribblings/reference/sequences.scrbl index f410905709..f535130d92 100644 --- a/pkgs/racket-doc/scribblings/reference/sequences.scrbl +++ b/pkgs/racket-doc/scribblings/reference/sequences.scrbl @@ -962,7 +962,9 @@ lists are checked immediately, as if @racket[c] had been used with If a contract is applied to a stream, and that stream is subsequently used as the tail of another stream (as the second parameter to @racket[stream-cons]), the new elements will not be checked with the contract, but the tail's elements -will still be enforced.} +will still be enforced. + +@history[#:added "6.1.1.8"]} @close-eval[sequence-evaluator] diff --git a/racket/collects/racket/stream.rkt b/racket/collects/racket/stream.rkt index e6b746b2bb..9bf6f42ae7 100644 --- a/racket/collects/racket/stream.rkt +++ b/racket/collects/racket/stream.rkt @@ -191,8 +191,7 @@ (define (impersonate-stream s first-proc rest-proc . props) (impersonate-generics gen:stream - ; the struct-info param is a hack, see PR 14970 - (apply impersonate-struct s struct-info (λ (a b) (values a b)) props) + s [stream-first (λ (stream-first) (impersonate-procedure stream-first @@ -200,13 +199,13 @@ [stream-rest (λ (stream-rest) (impersonate-procedure stream-rest - (λ (s) (values (λ (v) (rest-proc v)) s))))])) + (λ (s) (values (λ (v) (rest-proc v)) s))))] + #:properties props)) (define (chaperone-stream s first-proc rest-proc . props) (chaperone-generics gen:stream - ; the struct-info param is a hack, see PR 14970 - (apply chaperone-struct s struct-info (λ (a b) (values a b)) props) + s [stream-first (λ (stream-first) (chaperone-procedure stream-first @@ -214,7 +213,8 @@ [stream-rest (λ (stream-rest) (chaperone-procedure stream-rest - (λ (s) (values (λ (v) (rest-proc v)) s))))])) + (λ (s) (values (λ (v) (rest-proc v)) s))))] + #:properties props)) ;; Stream contracts ----------------------------------------------------------------------------------