guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-scsh ChangeLog INCOMPAT README alt-...


From: Gary Houston
Subject: guile/guile-scsh ChangeLog INCOMPAT README alt-...
Date: Sun, 15 Oct 2000 13:14:52 -0700

CVSROOT:        /cvs
Module name:    guile
Changes by:     Gary Houston <address@hidden>   00/10/15 13:14:51

Modified files:
        guile-scsh     : ChangeLog INCOMPAT README alt-syntax.scm 
                         bitwise.scm defrec.scm init.scm let-opt.scm 
                         receive.scm syntax-helpers.scm utilities.scm 
Added files:
        guile-scsh     : loophole.scm module-system.scm signals.scm 

Log message:
        2000-10-15  Gary Houston  <address@hidden>
        
        * bitwise.scm: define module (scsh bitwise).
        * utilities.scm: define module (scsh utilities).
        (reverse!): removed, since guile primitive is compatible.
        
        * syntax-helpers.scm: define module (scsh syntax-helpers).
        * signals.scm: new file.  move syntax-error here from alt-syntax.scm.
        define module (scsh signals).
        * module-system.scm: new file.  define module (scsh module-system).
        dummy definitions for define-structure, structure-ref moved from
        init.scm.
        * loophole.scm: new file from scsh-0.5.2: alt/loophole.scm.
        define module (scsh loopholes).  used by check-arg in utilities.scm.
        
        * defrec.scm (define-record-discloser): moved from init.scm.
        * let-opt.scm: define module (scsh let-opt).
        define module (scsh receive).
        * alt-syntax.scm: define module (scsh alt-syntax).
        * init.scm: use these modules.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/loophole.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/module-system.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/signals.scm.diff?r1=NONE&r2=1.1
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/ChangeLog.diff?r1=1.40&r2=1.41
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/INCOMPAT.diff?r1=1.17&r2=1.18
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/README.diff?r1=1.7&r2=1.8
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/alt-syntax.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/bitwise.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/defrec.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/init.scm.diff?r1=1.31&r2=1.32
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/let-opt.scm.diff?r1=1.3&r2=1.4
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/receive.scm.diff?r1=1.1&r2=1.2
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/syntax-helpers.scm.diff?r1=1.2&r2=1.3
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-scsh/utilities.scm.diff?r1=1.5&r2=1.6

Patches:
Index: guile/guile-scsh/ChangeLog
diff -u guile/guile-scsh/ChangeLog:1.40 guile/guile-scsh/ChangeLog:1.41
--- guile/guile-scsh/ChangeLog:1.40     Sat Oct 14 13:56:56 2000
+++ guile/guile-scsh/ChangeLog  Sun Oct 15 13:14:50 2000
@@ -1,3 +1,24 @@
+2000-10-15  Gary Houston  <address@hidden>
+
+       * bitwise.scm: define module (scsh bitwise).
+       * utilities.scm: define module (scsh utilities).
+       (reverse!): removed, since guile primitive is compatible.
+
+       * syntax-helpers.scm: define module (scsh syntax-helpers).
+       * signals.scm: new file.  move syntax-error here from alt-syntax.scm.
+       define module (scsh signals).
+       * module-system.scm: new file.  define module (scsh module-system).
+       dummy definitions for define-structure, structure-ref moved from
+       init.scm.
+       * loophole.scm: new file from scsh-0.5.2: alt/loophole.scm.
+       define module (scsh loopholes).  used by check-arg in utilities.scm.
+       
+       * defrec.scm (define-record-discloser): moved from init.scm.
+       * let-opt.scm: define module (scsh let-opt).
+       define module (scsh receive).
+       * alt-syntax.scm: define module (scsh alt-syntax).
+       * init.scm: use these modules.
+
 2000-10-14  Gary Houston  <address@hidden>
 
        * remove dependency on slib:
Index: guile/guile-scsh/INCOMPAT
diff -u guile/guile-scsh/INCOMPAT:1.17 guile/guile-scsh/INCOMPAT:1.18
--- guile/guile-scsh/INCOMPAT:1.17      Thu Oct 12 11:58:28 2000
+++ guile/guile-scsh/INCOMPAT   Sun Oct 15 13:14:50 2000
@@ -8,7 +8,8 @@
 Incompatibilities with the original scsh:
 ========================================
 
-everything is defined at the top level, no modules.
+the Guile module system is not compatible with that of Scheme48.  the
+module system isn't yet used for all files.
 
 loading guile-scsh may redefine Guile builtins.  e.g., map is
 redefined by list-lib.scm.  This isn't very good.  Maybe use of the
Index: guile/guile-scsh/README
diff -u guile/guile-scsh/README:1.7 guile/guile-scsh/README:1.8
--- guile/guile-scsh/README:1.7 Sat Oct 14 13:56:56 2000
+++ guile/guile-scsh/README     Sun Oct 15 13:14:50 2000
@@ -34,15 +34,44 @@
 %load-path in an interactive Guile session to see the current
 setting).
 
-The Guile module system is not currently used.  The package can be
-loaded into a running Guile interpreter with:
+The entire package can be loaded into a running Guile interpreter with:
 
 (load-from-path "scsh/init")
 
-The Guile port uses a record type to represent the multiple values
-returned by many scsh procedures.  The values can be retrieved
-using call-with-values or receive.  FIXME: check modern multiple values
-usage in guile-core.
+Note that this will clobber various Guile definitions.  It would be
+more useful to be able to import parts of scsh individually using the
+Guile module system, but this work is not yet complete.  At present
+the following modules are defined:
+
+(scsh alt-syntax): define-syntax syntax-rules
+;; not compatible with (ice-9 syncase)
+
+(scsh receive): receive
+;; compatible with (ice-9 receive), which is not available in Guile 1.4
+
+(scsh module-system): define-structure structure-ref
+;; dummy definitions.
+
+(scsh let-opt): let-optionals let-optionals* :optional
+;; not compatible with (ice-9 optargs).
+
+(scsh loophole): loophole
+;; dummy definition.
+
+(scsh signals): syntax-error
+
+(scsh syntax-helpers): transcribe-process-form
+
+(scsh bitwise): arithmetic-shift bitwise-not bitwise-and bitwise-ior
+        bitwise-xor
+
+(scsh utilities): del delete filter first first? nth fold fold-right
+       any every mapv mapv! vector-every? copy-vector initialize-vector
+       vector-append vfold vfold-right check-arg conjoin disjoin negate
+       compose call/cc deprecated-proc deposit-bit-field
+       real->exact-integer)
+;; "delete" is incompatile with guile primitive.
+
 
 FIXME: delete the autogenerated files from the repository and remove
 the text below.
Index: guile/guile-scsh/alt-syntax.scm
diff -u guile/guile-scsh/alt-syntax.scm:1.2 guile/guile-scsh/alt-syntax.scm:1.3
--- guile/guile-scsh/alt-syntax.scm:1.2 Sun Sep 17 02:03:21 2000
+++ guile/guile-scsh/alt-syntax.scm     Sun Oct 15 13:14:50 2000
@@ -1,6 +1,10 @@
 ; Copyright (c) 1993, 1994 Richard Kelsey and Jonathan Rees.  See file COPYING.
-; for Guile: redefined define-syntax, added syntax-error definition.
 
+;; original file: alt/syntax.scm.
+(define-module (scsh alt-syntax)
+  :use-module (scsh signals))
+(export-syntax define-syntax syntax-rules)
+
 ; This definition of define-syntax is appropriate for Scheme-to-C.
 
 ;(define-macro define-syntax
@@ -22,8 +26,6 @@
                                                    (lambda (x) x)
                                                    eq?)))))
 
-
-(define syntax-error error)
 
 ; Rewrite-rule compiler (a.k.a. "extend-syntax")
 
Index: guile/guile-scsh/bitwise.scm
diff -u guile/guile-scsh/bitwise.scm:1.1 guile/guile-scsh/bitwise.scm:1.2
--- guile/guile-scsh/bitwise.scm:1.1    Sat Aug 23 12:20:24 1997
+++ guile/guile-scsh/bitwise.scm        Sun Oct 15 13:14:50 2000
@@ -2,11 +2,16 @@
 
 ; modified for Guile.
 
+;; original file: alt/bitwise.scm.
+
 ; Bitwise operators written in vanilla Scheme.
 ; Written for clarity and simplicity, not for speed.
 
 ; No need to use these in Scheme 48 since Scheme 48's virtual machine
 ; provides fast machine-level implementations.
+
+(define-module (scsh bitwise))
+(export arithmetic-shift bitwise-not bitwise-and bitwise-ior bitwise-xor)
 
 ;; use Guile primitives.
 (define (bitwise-not a) (lognot a))
Index: guile/guile-scsh/defrec.scm
diff -u guile/guile-scsh/defrec.scm:1.2 guile/guile-scsh/defrec.scm:1.3
--- guile/guile-scsh/defrec.scm:1.2     Mon Sep  4 11:37:14 2000
+++ guile/guile-scsh/defrec.scm Sun Oct 15 13:14:50 2000
@@ -74,6 +74,8 @@
 ;;; - Code produced by the macro needs the RECORDS package.
 ;;; - Macro-expander code needs ERROR-PACKAGE and RECEIVING
 
+(defmacro define-record-discloser args #f)  ;; guile.
+
 (define-syntax define-record
   (lambda (form rename compare)
     (receive (field-specs method-specs)
Index: guile/guile-scsh/init.scm
diff -u guile/guile-scsh/init.scm:1.31 guile/guile-scsh/init.scm:1.32
--- guile/guile-scsh/init.scm:1.31      Sat Oct 14 13:56:56 2000
+++ guile/guile-scsh/init.scm   Sun Oct 15 13:14:50 2000
@@ -1,6 +1,5 @@
 (define (foreign-source . args) #f)
 (defmacro define-foreign args #f)
-(defmacro define-record-discloser args #f)
 
 (define ascii->char integer->char)
 (define char->ascii char->integer)
@@ -10,31 +9,18 @@
 (define (reading-error port message . irritants)
   (apply error message (append irritants (list port))))
 
-;; just pick out the begin forms.
-(defmacro define-structure (name interface . body)
-  (let loop ((rest body)
-            (result '(begin)))
-    (if (null? rest)
-       (reverse result)
-       (loop (cdr rest)
-             (if (eq? (caar rest) 'begin)
-                 (cons (car rest) result)
-                 result)))))
+(use-modules (ice-9 format)
+            (scsh alt-syntax)
+            (scsh receive)
+            (scsh module-system)
+            (scsh let-opt)
+            (scsh loophole)
+            (scsh signals)
+            (scsh syntax-helpers)
+            (scsh bitwise)
+            (scsh utilities)   ;; replaces primitive "delete".
+)
 
-(defmacro structure-ref (structure symb)
-  symb)
-
-(use-modules (ice-9 format))
-
-(load-from-path "scsh/alt-syntax.scm")
-(load-from-path "scsh/receive.scm")
-(load-from-path "scsh/let-opt.scm")
-
-(load-from-path "scsh/syntax-helpers.scm")
-
-;; "delete" primitive is replaced, but doesn't seem worth saving.
-(load-from-path "scsh/utilities.scm")
-
 (load-from-path "scsh/scsh-version.scm")
 (load-from-path "scsh/fname.scm")
 (load-from-path "scsh/errno.scm")
@@ -44,7 +30,6 @@
 (load-from-path "scsh/fluid.scm")
 (load-from-path "scsh/population.scm")
 (load-from-path "scsh/stringcoll.scm")
-(load-from-path "scsh/bitwise.scm")
 (load-from-path "scsh/condition.scm")
 (load-from-path "scsh/scsh-condition.scm")
 (load-from-path "scsh/jar-defrecord.scm")
Index: guile/guile-scsh/let-opt.scm
diff -u guile/guile-scsh/let-opt.scm:1.3 guile/guile-scsh/let-opt.scm:1.4
--- guile/guile-scsh/let-opt.scm:1.3    Mon Mar 10 20:30:40 1997
+++ guile/guile-scsh/let-opt.scm        Sun Oct 15 13:14:50 2000
@@ -88,6 +88,11 @@
 ;;;                      (error ...)))))))))
 
 
+(define-module (scsh let-opt)
+  :use-module (scsh alt-syntax)
+  :use-module (scsh module-system))
+(export-syntax let-optionals let-optionals* :optional)
+
 (define-structure let-opt-expanders (export expand-let-optionals)
   (open scheme)
   (begin
Index: guile/guile-scsh/receive.scm
diff -u guile/guile-scsh/receive.scm:1.1 guile/guile-scsh/receive.scm:1.2
--- guile/guile-scsh/receive.scm:1.1    Mon Dec 16 22:44:12 1996
+++ guile/guile-scsh/receive.scm        Sun Oct 15 13:14:50 2000
@@ -1,5 +1,9 @@
 ; Copyright (c) 1993, 1994 Richard Kelsey and Jonathan Rees.  See file COPYING.
 
+;; original file: big/receive.scm.
+(define-module (scsh receive)
+  :use-module (scsh alt-syntax))
+(export-syntax receive)
 
 (define-syntax receive
   (syntax-rules ()
Index: guile/guile-scsh/syntax-helpers.scm
diff -u guile/guile-scsh/syntax-helpers.scm:1.2 
guile/guile-scsh/syntax-helpers.scm:1.3
--- guile/guile-scsh/syntax-helpers.scm:1.2     Mon Sep  4 11:37:14 2000
+++ guile/guile-scsh/syntax-helpers.scm Sun Oct 15 13:14:50 2000
@@ -5,6 +5,12 @@
 ;;; Must be loaded into for-syntax package.
 ;;; Copyright (c) 1993 by Olin Shivers. See file COPYING.
 
+(define-module (scsh syntax-helpers)
+  :use-module (scsh alt-syntax)
+  :use-module (scsh signals)
+  :use-module (scsh receive))
+(export transcribe-process-form)
+
 (define-syntax define-simple-syntax
   (syntax-rules ()
     ((define-simple-syntax (name . pattern) result)
Index: guile/guile-scsh/utilities.scm
diff -u guile/guile-scsh/utilities.scm:1.5 guile/guile-scsh/utilities.scm:1.6
--- guile/guile-scsh/utilities.scm:1.5  Mon Sep  4 11:37:14 2000
+++ guile/guile-scsh/utilities.scm      Sun Oct 15 13:14:50 2000
@@ -1,6 +1,21 @@
 ;;; Random useful utilities.
 ;;; Copyright (c) 1993 by Olin Shivers. See file COPYING.
 
+(define-module (scsh utilities)
+  :use-module (scsh loophole)
+  :use-module (scsh bitwise))
+(export del delete filter first first? nth
+       fold fold-right
+       any every
+       mapv mapv! vector-every? copy-vector initialize-vector vector-append
+       vfold vfold-right
+       check-arg conjoin disjoin negate compose call/cc
+       deprecated-proc
+       deposit-bit-field
+       real->exact-integer
+       ;; reverse! omitted.
+)
+
 (define (del elt lis)
   (letrec ((del (lambda (lis)
                  (if (pair? lis)
@@ -149,14 +164,14 @@
 
 (define (compose f g)
   (lambda args (call-with-values (lambda () (apply g args)) f)))
-
 
-(define (reverse! lis)
-  (let lp ((lis lis) (prev '()))
-    (if (not (pair? lis)) prev
-       (let ((tail (cdr lis)))
-         (set-cdr! lis prev)
-         (lp tail lis)))))
+;; guile primitive is compatible.
+;;(define (reverse! lis)
+;;  (let lp ((lis lis) (prev '()))
+;;    (if (not (pair? lis)) prev
+;;     (let ((tail (cdr lis)))
+;;       (set-cdr! lis prev)
+;;       (lp tail lis)))))
 
 (define call/cc call-with-current-continuation)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]