From 0f38ed6b08715845aabdf9bcf138849bc7e1b87f Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 30 Jun 2019 23:44:16 +0000 Subject: [PATCH] Flesh out an example and fix a typo. --- doc/ref-manual/numbers.texi | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/ref-manual/numbers.texi b/doc/ref-manual/numbers.texi index 4975258bb..b5513af9e 100644 --- a/doc/ref-manual/numbers.texi +++ b/doc/ref-manual/numbers.texi @@ -2519,14 +2519,25 @@ currently trapped. exceptions altogether by @var{excepts}. @example +@group (define (flo:trap-exceptions! excepts) (flo:set-trapped-exceptions! - (fix:or excepts (fix:trapped-exceptions)))) + (fix:or (flo:trapped-exceptions) excepts))) + +(define (flo:untrap-exceptions! excepts) + (flo:set-trapped-exceptions! + (fix:andc (flo:trapped-exceptions) excepts))) + +(define (flo:set-trapped-exceptions! excepts) + (flo:trap-exceptions! excepts) + (flo:untrap-exceptions! + (fix:andc (flo:supported-exceptions) excepts))) +@end group @end example @end deffn @deffn procedure flo:with-exceptions-trapped excepts thunk -@deffnx procedure flo:with-exceptions-trapped excepts thunk +@deffnx procedure flo:with-exceptions-untrapped excepts thunk @deffnx procedure flo:with-trapped-exceptions excepts thunk Dynamic-extent analogues of @code{flo:trap-exceptions!}, @code{flo:untrap-exceptions!}, and @code{flo:set-trapped-exceptions!}. -- 2.25.1