From 5895eabad13aa0b7209625f2437998419f4324c8 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Sat, 7 Mar 2015 23:27:52 -0800 Subject: [PATCH] Add break-parameterization?. Closes PR 11966. --- pkgs/racket-doc/scribblings/reference/breaks.scrbl | 10 ++++++++-- racket/collects/racket/private/more-scheme.rkt | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/racket-doc/scribblings/reference/breaks.scrbl b/pkgs/racket-doc/scribblings/reference/breaks.scrbl index 527fe98b84..efdc197c35 100644 --- a/pkgs/racket-doc/scribblings/reference/breaks.scrbl +++ b/pkgs/racket-doc/scribblings/reference/breaks.scrbl @@ -120,7 +120,7 @@ value, breaks are enabled.} @defform[(parameterize-break boolean-expr body ...+)]{Evaluates @racket[boolean-expr] to determine whether breaks are initially enabled while evaluating the @racket[body]s in sequence. The result -of the @racket[parameter-break] expression is the result of the last +of the @racket[parameterize-break] expression is the result of the last @racket[expr]. Like @racket[parameterize] (see @secref["parameters"]), a fresh @@ -132,7 +132,7 @@ threads.} @defproc[(current-break-parameterization) break-parameterization?]{ Analogous to @racket[(current-parameterization)] (see -@secref["parameters"]); it returns a break-parameterization +@secref["parameters"]); it returns a break parameterization (effectively, a thread cell) that holds the current continuation's break-enable state.} @@ -145,3 +145,9 @@ thunk)] (see @secref["parameters"]), calls @racket[thunk] in a continuation whose break-enabled state is in @racket[break-param]. The @racket[thunk] is @italic{not} called in tail position with respect to the @racket[call-with-break-parameterization] call.} + +@defproc[(break-parameterization? [v any/c]) boolean?]{ +Returns @racket[#t] if @racket[v] is a break parameterization as produced by +@racket[current-break-parameterization], @racket[#f] otherwise. + +@history[#:added "6.1.1.8"]} diff --git a/racket/collects/racket/private/more-scheme.rkt b/racket/collects/racket/private/more-scheme.rkt index bcaf853218..9dafcee29a 100644 --- a/racket/collects/racket/private/more-scheme.rkt +++ b/racket/collects/racket/private/more-scheme.rkt @@ -382,6 +382,7 @@ (#%provide case old-case do parameterize parameterize* current-parameterization call-with-parameterization parameterize-break current-break-parameterization call-with-break-parameterization + (rename break-paramz? break-parameterization?) with-handlers with-handlers* call-with-exception-handler set!-values let/cc fluid-let time