aboutsummaryrefslogtreecommitdiff
path: root/module/hnh
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-03-17 22:15:59 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-28 14:17:47 +0200
commitd4667f94fbd2927e1c76a06567a92dedf1213e43 (patch)
tree1db96f4ee662f2b221790318feaa48b66044aa82 /module/hnh
parentUse catch* where appropriate (diff)
downloadcalp-d4667f94fbd2927e1c76a06567a92dedf1213e43.tar.gz
calp-d4667f94fbd2927e1c76a06567a92dedf1213e43.tar.xz
Remove assert.
Barely used, and almost always was better server by a propper error call.
Diffstat (limited to 'module/hnh')
-rw-r--r--module/hnh/util/exceptions.scm16
1 files changed, 1 insertions, 15 deletions
diff --git a/module/hnh/util/exceptions.scm b/module/hnh/util/exceptions.scm
index bcfd506d..eed310bb 100644
--- a/module/hnh/util/exceptions.scm
+++ b/module/hnh/util/exceptions.scm
@@ -6,7 +6,7 @@
#:use-module ((system vm frame)
:select (frame-bindings binding-ref))
- #:export (assert))
+ )
(define-public warning-handler
@@ -31,20 +31,6 @@
(raise 2)
)
-(define (prettify-tree tree)
- (cond [(pair? tree) (cons (prettify-tree (car tree))
- (prettify-tree (cdr tree)))]
- [(and (procedure? tree) (procedure-name tree))
- => identity]
- [else tree]))
-
-
-(define-macro (assert form)
- `(unless ,form
- (throw 'assertion-error "Assertion failed. ~a expected, ~a got"
- (quote ,form)
- ((@@ (calp util exceptions) prettify-tree) (list ,form)))))
-
(define-public (filter-stack pred? stk)
(concatenate