diff options
Diffstat (limited to 'module/ice-9/debugging/traps.scm')
-rwxr-xr-x | module/ice-9/debugging/traps.scm | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/module/ice-9/debugging/traps.scm b/module/ice-9/debugging/traps.scm index e13011e99..292456d43 100755 --- a/module/ice-9/debugging/traps.scm +++ b/module/ice-9/debugging/traps.scm @@ -25,6 +25,7 @@ (define-module (ice-9 debugging traps) #:use-module (ice-9 regex) + #:use-module (ice-9 weak-vector) #:use-module (oop goops) #:use-module (oop goops describe) #:use-module (ice-9 debugging trc) @@ -86,11 +87,6 @@ ;; "(trc " to find other symbols that can be passed to trc-add. ;; (trc-add 'after-gc-hook) -;; In Guile 1.7 onwards, weak-vector and friends are provided by the -;; (ice-9 weak-vector) module. -(cond ((string>=? (version) "1.7") - (use-modules (ice-9 weak-vector)))) - ;;; The current low level traps interface is as follows. ;;; ;;; All trap handlers are subject to SCM_TRAPS_P, which is controlled @@ -1002,34 +998,7 @@ it twice." (trap-disable 'traps) (thunk)))) -(define guile-trap-features - ;; Helper procedure, to test whether a specific possible Guile - ;; feature is supported. - (let ((supported? - (lambda (test-feature) - (case test-feature - ((tweaking) - ;; Tweaking is supported if the description of the cheap - ;; traps option includes the word "obsolete", or if the - ;; option isn't there any more. - (and (string>=? (version) "1.7") - (let ((cheap-opt-desc - (assq 'cheap (debug-options-interface 'help)))) - (or (not cheap-opt-desc) - (string-match "obsolete" (caddr cheap-opt-desc)))))) - (else - (error "Unexpected feature name:" test-feature)))))) - ;; Compile the list of actually supported features from all - ;; possible features. - (let loop ((possible-features '(tweaking)) - (actual-features '())) - (if (null? possible-features) - (reverse! actual-features) - (let ((test-feature (car possible-features))) - (loop (cdr possible-features) - (if (supported? test-feature) - (cons test-feature actual-features) - actual-features))))))) +(define guile-trap-features '(tweaking)) ;; Make sure that traps are enabled. (trap-enable 'traps) |