From db70f9751f4d8e1a671643ac8d592f9194cec10b Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Thu, 1 May 2008 17:52:52 -0400 Subject: [PATCH] Made all unimplemented procedures raise errors when called. --- scheme/Makefile.am | 2 +- scheme/Makefile.in | 2 +- scheme/ikarus.not-yet-implemented.ss | 75 ++++++++++++++++++++++++++++ scheme/last-revision | 2 +- scheme/makefile.ss | 67 +++++++++++++------------ 5 files changed, 112 insertions(+), 36 deletions(-) create mode 100644 scheme/ikarus.not-yet-implemented.ss diff --git a/scheme/Makefile.am b/scheme/Makefile.am index 055b7a7..054e499 100644 --- a/scheme/Makefile.am +++ b/scheme/Makefile.am @@ -23,7 +23,7 @@ EXTRA_DIST=ikarus.boot.prebuilt ikarus.enumerations.ss \ psyntax.compat.ss psyntax.config.ss psyntax.expander.ss \ psyntax.internal.ss psyntax.library-manager.ss \ unicode/unicode-char-cases.ss unicode/unicode-charinfo.ss \ - ikarus.io.ss ikarus.time-and-date.ss + ikarus.io.ss ikarus.time-and-date.ss ikarus.not-yet-implemented.ss all: $(nodist_pkglib_DATA) diff --git a/scheme/Makefile.in b/scheme/Makefile.in index 9106662..5fdecdf 100644 --- a/scheme/Makefile.in +++ b/scheme/Makefile.in @@ -177,7 +177,7 @@ EXTRA_DIST = ikarus.boot.prebuilt ikarus.enumerations.ss \ psyntax.compat.ss psyntax.config.ss psyntax.expander.ss \ psyntax.internal.ss psyntax.library-manager.ss \ unicode/unicode-char-cases.ss unicode/unicode-charinfo.ss \ - ikarus.io.ss ikarus.time-and-date.ss + ikarus.io.ss ikarus.time-and-date.ss ikarus.not-yet-implemented.ss revno = "$(shell sed 's/ .*//' ../.bzr/branch/last-revision 2>/dev/null)" CLEANFILES = $(nodist_pkglib_DATA) ikarus.config.ss diff --git a/scheme/ikarus.not-yet-implemented.ss b/scheme/ikarus.not-yet-implemented.ss new file mode 100644 index 0000000..005dc97 --- /dev/null +++ b/scheme/ikarus.not-yet-implemented.ss @@ -0,0 +1,75 @@ + +(library (ikarus not-yet-implemented) + (export + make-rectangular angle make-polar bitwise-ior bitwise-xor + bitwise-copy-bit-field bitwise-reverse-bit-field + bitwise-rotate-bit-field bitwise-if fxreverse-bit-field + fxrotate-bit-field bytevector->string string->bytevector + make-custom-binary-input/output-port + make-custom-textual-input/output-port + open-file-input/output-port output-port-buffer-mode + port-has-port-position? port-has-set-port-position!? + port-position set-port-position! make-eqv-hashtable + hashtable-hash-function make-hashtable + hashtable-equivalence-function equal-hash + string-downcase string-normalize-nfc string-normalize-nfd + string-normalize-nfkc string-normalize-nfkd string-titlecase + string-upcase) + + (import (except (ikarus) + make-rectangular angle make-polar bitwise-ior bitwise-xor + bitwise-copy-bit-field bitwise-reverse-bit-field + bitwise-rotate-bit-field bitwise-if fxreverse-bit-field + fxrotate-bit-field bytevector->string string->bytevector + make-custom-binary-input/output-port + make-custom-textual-input/output-port + open-file-input/output-port output-port-buffer-mode + port-has-port-position? port-has-set-port-position!? + port-position set-port-position! make-eqv-hashtable + hashtable-hash-function make-hashtable + hashtable-equivalence-function equal-hash + string-downcase string-normalize-nfc string-normalize-nfd + string-normalize-nfkc string-normalize-nfkd string-titlecase + string-upcase)) + + + + (define-syntax not-yet + (syntax-rules () + [(_ x* ...) + (begin + (define (bug op) + (define-condition-type &url &condition + make-url-condition + url-condition? + (url condition-url)) + (raise + (condition + (make-error) + (make-who-condition 'ikarus) + (make-message-condition "primitive not supported yet") + (make-message-condition + "please file a bug report to help us prioritize our goals") + (make-url-condition + "https://bugs.launchpad.net/ikarus/+filebug") + (make-irritants-condition (list op))))) + (define (x* . args) (bug 'x*)) + ...)])) + + (not-yet + make-rectangular angle make-polar bitwise-ior bitwise-xor + bitwise-copy-bit-field bitwise-reverse-bit-field + bitwise-rotate-bit-field bitwise-if fxreverse-bit-field + fxrotate-bit-field bytevector->string string->bytevector + make-custom-binary-input/output-port + make-custom-textual-input/output-port + open-file-input/output-port output-port-buffer-mode + port-has-port-position? port-has-set-port-position!? + port-position set-port-position! make-eqv-hashtable + hashtable-hash-function make-hashtable + hashtable-equivalence-function equal-hash + string-downcase string-normalize-nfc string-normalize-nfd + string-normalize-nfkc string-normalize-nfkd string-titlecase + string-upcase)) + + diff --git a/scheme/last-revision b/scheme/last-revision index 2800f1b..8c4a5f4 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1460 +1461 diff --git a/scheme/makefile.ss b/scheme/makefile.ss index eeda3cd..574fda4 100755 --- a/scheme/makefile.ss +++ b/scheme/makefile.ss @@ -98,6 +98,7 @@ "ikarus.sort.ss" "ikarus.promises.ss" "ikarus.enumerations.ss" + "ikarus.not-yet-implemented.ss" "ikarus.main.ss" )) @@ -616,7 +617,7 @@ [/ i r ba se] [abs i r ba se] [acos i r ba se] - [angle r ba se] + [angle i r ba se] [append i r ba se] [apply i r ba se] [asin i r ba se] @@ -709,8 +710,8 @@ [list? i r ba se] [log i r ba se] [magnitude i r ba se] - [make-polar r ba se] - [make-rectangular r ba se] + [make-polar i r ba se] + [make-rectangular i r ba se] [make-string i r ba se] [make-vector i r ba se] [map i r ba se] @@ -778,18 +779,18 @@ [bitwise-arithmetic-shift-right i r bw] [bitwise-not i r bw] [bitwise-and i r bw] - [bitwise-ior r bw] - [bitwise-xor r bw] + [bitwise-ior i r bw] + [bitwise-xor i r bw] [bitwise-bit-count i r bw] [bitwise-bit-field i r bw] [bitwise-bit-set? i r bw] [bitwise-copy-bit i r bw] - [bitwise-copy-bit-field r bw] + [bitwise-copy-bit-field i r bw] [bitwise-first-bit-set i r bw] - [bitwise-if r bw] + [bitwise-if i r bw] [bitwise-length i r bw] - [bitwise-reverse-bit-field r bw] - [bitwise-rotate-bit-field r bw] + [bitwise-reverse-bit-field i r bw] + [bitwise-rotate-bit-field i r bw] [fixnum? i r fx] [fixnum-width i r fx] [least-fixnum i r fx] @@ -831,8 +832,8 @@ [fxnot i r fx] [fxodd? i r fx] [fxpositive? i r fx] - [fxreverse-bit-field r fx] - [fxrotate-bit-field r fx] + [fxreverse-bit-field i r fx] + [fxrotate-bit-field i r fx] [fxxor i r fx] [fxzero? i r fx] [fixnum->flonum i r fl] @@ -1028,7 +1029,7 @@ [binary-port? i r ip] [buffer-mode i r ip] [buffer-mode? i r ip] - [bytevector->string r ip] + [bytevector->string i r ip] [call-with-bytevector-output-port i r ip] [call-with-port i r ip] [call-with-string-output-port i r ip] @@ -1119,8 +1120,8 @@ [make-custom-binary-output-port i r ip] [make-custom-textual-input-port i r ip] [make-custom-textual-output-port i r ip] - [make-custom-binary-input/output-port r ip] - [make-custom-textual-input/output-port r ip] + [make-custom-binary-input/output-port i r ip] + [make-custom-textual-input/output-port i r ip] [make-i/o-decoding-error i r ip] [make-i/o-encoding-error i r ip] [make-i/o-error i r ip is fi] @@ -1141,15 +1142,15 @@ [open-bytevector-input-port i r ip] [open-bytevector-output-port i r ip] [open-file-input-port i r ip] - [open-file-input/output-port r ip] + [open-file-input/output-port i r ip] [open-file-output-port i r ip] [open-string-input-port i r ip] [open-string-output-port i r ip] - [output-port-buffer-mode r ip] + [output-port-buffer-mode i r ip] [port-eof? i r ip] - [port-has-port-position? r ip] - [port-has-set-port-position!? r ip] - [port-position r ip] + [port-has-port-position? i r ip] + [port-has-set-port-position!? i r ip] + [port-position i r ip] [port-transcoder i r ip] [port? i r ip] [put-bytevector i r ip] @@ -1157,11 +1158,11 @@ [put-datum i r ip] [put-string i r ip] [put-u8 i r ip] - [set-port-position! r ip] + [set-port-position! i r ip] [standard-error-port i r ip] [standard-input-port i r ip] [standard-output-port i r ip] - [string->bytevector r ip] + [string->bytevector i r ip] [textual-port? i r ip] [transcoded-port i r ip] [transcoder-codec i r ip] @@ -1205,11 +1206,11 @@ [hashtable-update! i r ht] [hashtable? i r ht] [make-eq-hashtable i r ht] - [make-eqv-hashtable r ht] - [hashtable-hash-function r ht] - [make-hashtable r ht] - [hashtable-equivalence-function r ht] - [equal-hash r ht] + [make-eqv-hashtable i r ht] + [hashtable-hash-function i r ht] + [make-hashtable i r ht] + [hashtable-equivalence-function i r ht] + [equal-hash i r ht] [string-hash i r ht] [string-ci-hash i r ht] [symbol-hash i r ht] @@ -1282,14 +1283,14 @@ [string-ci=? i r uc se] [string-ci>=? i r uc se] [string-ci>? i r uc se] - [string-downcase r uc] + [string-downcase i r uc] [string-foldcase i r uc] - [string-normalize-nfc r uc] - [string-normalize-nfd r uc] - [string-normalize-nfkc r uc] - [string-normalize-nfkd r uc] - [string-titlecase r uc] - [string-upcase r uc] + [string-normalize-nfc i r uc] + [string-normalize-nfd i r uc] + [string-normalize-nfkc i r uc] + [string-normalize-nfkd i r uc] + [string-titlecase i r uc] + [string-upcase i r uc] [getenv i] [nanosleep i] [char-ready? ]