Use asdf/driver, not asdf-utils anymore.
authorFrancois-Rene Rideau <tunes@google.com>
Sun, 13 Jan 2013 19:46:02 +0000 (14:46 -0500)
committerFrancois-Rene Rideau <tunes@google.com>
Sun, 13 Jan 2013 19:46:02 +0000 (14:46 -0500)
base/macros.lisp
base/more-strings.lisp
base/streams.lisp
fare-utils.asd
package.lisp

index 856f358..a0f5bbf 100644 (file)
@@ -466,10 +466,10 @@ is invoked as an ERROR-BEHAVIOR."
 (defun combinationp (x &optional on-error)
   "Is the form X a combination of a head and arguments,
 to be evaluated as function call, macro call, or special form?"
-  (and (consp x)
-       (if on-error
-          (or (listp #|not bothering with proper-list-p|# x) (error-behavior on-error x))
-        t)))
+  (declare (ignorable on-error)) ;; I don't want to either import or duplicate alexandria:proper-list-p
+  ;;(and (consp x) (if on-error (or (proper-list-p x) (error-behavior on-error x)) t))
+  (consp x))
+  
 (defun literalp (x)
   "predicate that tells whether X is the source form for a literal expression."
   (typep x '(or boolean number character array keyword)))
index f89b579..a3a84c6 100644 (file)
@@ -6,7 +6,7 @@
 (in-package :fare-utils)
 
 (def*fun join-strings (strings &key stream separator)
-  (with-output-stream (stream)
+  (with-output (stream)
     (loop
       :with sep = (->string separator)
       :for (string . more-strings) :on strings :do
     (unless (zerop l)
       (subseq string 0 (1- l)))))
 
-(def*fun string-prefix-p (prefix string)
-  (let* ((x (string prefix))
-         (y (string string))
-         (lx (length x))
-         (ly (length y)))
-    (and (<= lx ly) (string= x y :end2 lx))))
-
-(def*fun string-suffix-p (string suffix)
-  (let* ((x (string string))
-         (y (string suffix))
-         (lx (length x))
-         (ly (length y)))
-    (and (<= ly lx) (string= x y :start1 (- lx ly)))))
-
-(def*fun string-enclosed-p (prefix string suffix)
-  (and (string-prefix-p prefix string)
-       (string-suffix-p string suffix)))
-
 (def*fun string-strip-prefix (prefix string)
   (when (string-prefix-p prefix string)
     (subseq string (1+ (length prefix)))))
index 2eb1c27..22ead94 100644 (file)
@@ -4,61 +4,6 @@
 
 (in-package :fare-utils)
 
-(def*generic call-with-output-stream (x fun)
-  (:documentation
-   "Calls FUN with an actual stream argument, behaving like FORMAT with respect to stream'ing:
-If OBJ is a stream, use it as the stream.
-If OBJ is NIL, use a STRING-OUTPUT-STREAM as the stream, and return the resulting string.
-If OBJ is T, use *STANDARD-OUTPUT* as the stream.
-If OBJ is a string with a fill-pointer, use it as a string-output-stream.
-Otherwise, signal an error.")
-  (:method ((x null) fun)
-    (with-output-to-string (s) (funcall fun s)))
-  (:method ((x (eql t)) fun)
-    (funcall fun *standard-output*) nil)
-  #-genera
-  (:method ((x stream) fun)
-    (funcall fun x) nil)
-  (:method ((x string) fun)
-    (assert (fill-pointer x))
-    (with-output-to-string (s x) (funcall fun s)))
-  (:method (x fun)
-    (declare (ignorable fun))
-    (cond
-      #+genera
-      ((typep x 'stream) (funcall fun x) nil)
-      (t (error "not a valid stream designator ~S" x)))))
-
-(def*macro with-output-stream ((x &optional (value x)) &body body)
-  `(call-with-output-stream ,value #'(lambda (,x) ,@body)))
-
-(def*generic call-with-input-stream (x fun)
-  (:documentation
-   "Calls FUN with an actual stream argument, coercing behaving like READ with respect to stream'ing:
-If OBJ is a stream, use it as the stream.
-If OBJ is NIL, use a STRING-OUTPUT-STREAM as the stream, and return the resulting string.
-If OBJ is T, use *STANDARD-OUTPUT* as the stream.
-If OBJ is a string with a fill-pointer, use it as a string-output-stream.
-Otherwise, signal an error.")
-  (:method ((x null) fun)
-    (funcall fun *terminal-io*))
-  (:method ((x (eql t)) fun)
-    (funcall fun *standard-input*) nil)
-  #-genera
-  (:method ((x stream) fun)
-    (funcall fun x) nil)
-  (:method ((x string) fun)
-    (with-input-from-string (s x) (funcall fun s)))
-  (:method (x fun)
-    (declare (ignorable fun))
-    (cond
-      #+genera
-      ((typep x 'stream) (funcall fun x) nil)
-      (t (error "not a valid stream designator ~S" x)))))
-
-(def*macro with-input-stream ((x &optional (value x)) &body body)
-  `(call-with-input-stream ,value #'(lambda (,x) ,@body)))
-
 (def*parameter *standard-readtable* (copy-readtable nil))
 (def*parameter *safe-package* :cl)
 
index ae8bd19..c6797fb 100644 (file)
@@ -5,7 +5,7 @@
 It contains a lot of basic everyday functions and macros,
 but also a library of pure and stateful datastructures,
 and Lisp extensions for memoization and reader interception."
-  :depends-on (:asdf-utils)
+  :depends-on (:asdf)
   :components
   ((:file "package")
 
index 70f15bf..a25c137 100644 (file)
@@ -10,7 +10,7 @@
 |#
 
 (defpackage #:fare-utils
-  (:use #:common-lisp #:asdf-utils)
+  (:use #:common-lisp #:asdf/driver)
   #+genera (:import-from #:scl #:boolean)
   ;; #+clisp (:shadow :with-gensyms)
   (:export