From 3fb4b93bc1b68912ee22f8f7445faa087ae500eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 23 Aug 2020 16:25:39 +0200 Subject: Move catch-warnings. --- module/util.scm | 11 ----------- module/util/exceptions.scm | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'module') diff --git a/module/util.scm b/module/util.scm index 28864896..eab93a69 100644 --- a/module/util.scm +++ b/module/util.scm @@ -561,17 +561,6 @@ -(define-syntax catch-warnings - (syntax-rules () - ((_ default body ...) - (parametrize ((warnings-are-errors #t)) - (catch 'warning - (lambda () - body ...) - (lambda _ default)))))) - - - (define-syntax let-env (syntax-rules () [(_ ((name value) ...) diff --git a/module/util/exceptions.scm b/module/util/exceptions.scm index 8db18605..f316451d 100644 --- a/module/util/exceptions.scm +++ b/module/util/exceptions.scm @@ -83,3 +83,13 @@ (throw 'assertion-error "Assertion for ~a failed, ~a" (quote ,form) ((@@ (util exceptions) prettify-tree) ,(cons 'list form))))) + + +(define-syntax catch-warnings + (syntax-rules () + ((_ default body ...) + (parametrize ((warnings-are-errors #t)) + (catch 'warning + (lambda () + body ...) + (lambda _ default)))))) -- cgit v1.2.3