guile-devel
[Top][All Lists]
Advanced

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

match.scm and slib


From: Dale P. Smith
Subject: match.scm and slib
Date: Wed, 13 Jun 2001 10:50:54 -0400

Since the pretty-print module has been added to guile, match.scm does
not requite slib to be installed anymore.  A patch is attached.

-Dale

-- 
Dale P. Smith
Treasurer, Cleveland Linux Users Group http://cleveland.lug.net
Senior Systems Consultant, Altus Technologies Corporation
address@hidden
440-746-9000 x309
Index: match.scm
===================================================================
RCS file: /cvs/guile/guile-core/ice-9/match.scm,v
retrieving revision 1.6
diff -u -r1.6 match.scm
--- match.scm   2001/06/03 23:29:45     1.6
+++ match.scm   2001/06/13 14:26:28
@@ -43,7 +43,7 @@
 ;;;; 
 
 (define-module  (ice-9 match)
-  :use-module (ice-9 slib)
+  :use-module (ice-9 pretty-print)
   :export (match match-lambda match-lambda* match-define
                 match-let match-let* match-letrec
                 define-structure define-const-structure
@@ -52,8 +52,6 @@
                 match:structure-control match:set-structure-control
                 match:runtime-structures match:set-runtime-structures))
 
-(define slib:error error)
-
 ;; The original code can be found at the Scheme Repository
 ;; 
 ;;   http://www.cs.indiana.edu/scheme-repository/code.match.html
@@ -196,10 +194,9 @@
 ;; End of user visible/modifiable stuff.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(require (quote pretty-print))
-(define match:error (lambda (val . args) (for-each pretty-print args) 
(slib:error "no matching clause for " val)))
+(define match:error (lambda (val . args) (for-each pretty-print args) (error 
"no matching clause for " val)))
 (define match:andmap (lambda (f l) (if (null? l) (and) (and (f (car l)) 
(match:andmap f (cdr l))))))
-(define match:syntax-err (lambda (obj msg) (slib:error msg obj)))
+(define match:syntax-err (lambda (obj msg) (error msg obj)))
 (define match:disjoint-structure-tags (quote ()))
 (define match:make-structure-tag (lambda (name) (if (or (eq? 
match:structure-control (quote disjoint)) match:runtime-structures) (let ((tag 
(gensym))) (set! match:disjoint-structure-tags (cons tag 
match:disjoint-structure-tags)) tag) (string->symbol (string-append "<" 
(symbol->string name) ">")))))
 (define match:structure? (lambda (tag) (memq tag 
match:disjoint-structure-tags)))

reply via email to

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