summaryrefslogtreecommitdiffstats
path: root/wttree.scm
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:26 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:26 -0800
commitf24b9140d6f74804d5599ec225717d38ca443813 (patch)
tree0da952f1a5a7c0eacfc05c296766523e32c05fe2 /wttree.scm
parent8ffbc2df0fde83082610149d24e594c1cd879f4a (diff)
downloadslib-f24b9140d6f74804d5599ec225717d38ca443813.tar.gz
slib-f24b9140d6f74804d5599ec225717d38ca443813.zip
Import Upstream version 2c0upstream/2c0
Diffstat (limited to 'wttree.scm')
-rw-r--r--wttree.scm24
1 files changed, 15 insertions, 9 deletions
diff --git a/wttree.scm b/wttree.scm
index 467aa86..7cfa85e 100644
--- a/wttree.scm
+++ b/wttree.scm
@@ -56,14 +56,6 @@
;;
;; It has been tested on MIT-Scheme, scheme48 and scm4e1
;;
-;; Non-standard procedures:
-;; error
-;; error:wrong-type-argument
-;; error:band-range-argument
-;; These are only called when there is an error so it is not critical to
-;; have them defined :-)
-;;
-;;
;; If your system has a compiler and you want this code to run fast, you
;; should do whatever is necessary to inline all of the structure accessors.
;;
@@ -71,6 +63,20 @@
;;
;;(declare (usual-integrations))
+(define error
+ (case (scheme-implementation-type)
+ ((MITScheme) error)
+ (else slib:error)))
+(define error:wrong-type-argument
+ (case (scheme-implementation-type)
+ ((MITScheme) error:wrong-type-argument)
+ (else (lambda (arg1 arg2 arg3)
+ (slib:error 'wrong-type-argument arg1 arg2 arg3)))))
+(define error:bad-range-argument
+ (case (scheme-implementation-type)
+ ((MITScheme) error:bad-range-argument)
+ (else (lambda (arg1 arg2)
+ (slib:error 'bad-range-argument arg1 arg2)))))
;;;
;;; Interface to this package.
@@ -127,7 +133,7 @@
(define fix:+ +)
(define fix:- -)
(define fix:< <)
- (define fix:<= <)
+ (define fix:<= <=)
(define fix:> >)
(define fix:* *)