- renamed tsend-line to tsend/cr

- removed functions implemented in srfi-1
This commit is contained in:
frese 2004-07-26 16:25:57 +00:00
parent 3428c7a94d
commit 22db3628ab
3 changed files with 12 additions and 24 deletions

View File

@ -23,22 +23,6 @@
(let ((v exp)) (mlet (init ...) body ...))))) (let ((v exp)) (mlet (init ...) body ...)))))
(define (filter pred lis)
(if (pair? lis)
(let ((x (car lis)))
(if (pred x) (cons x (filter pred (cdr lis)))
(filter pred (cdr lis))))
'()))
(define (partition pred lis)
(if (pair? lis)
(let ((x (car lis)))
(receive (ins outs) (partition pred (cdr lis))
(if (pred x)
(values (cons x ins) outs)
(values ins (cons x outs)))))
(values '() '())))
;;; This is a hairy mother. If you ever try to read it or change it, you are ;;; This is a hairy mother. If you ever try to read it or change it, you are
;;; advised to first try expanding a couple of toy examples and looking at the ;;; advised to first try expanding a couple of toy examples and looking at the
;;; output to get a feel for the basic compilation strategy. ;;; output to get a feel for the basic compilation strategy.

View File

@ -6,6 +6,8 @@
;;; - Fairness & round-robin looping ;;; - Fairness & round-robin looping
;;; - If all tasks eof, should we detect this and bail out early? ;;; - If all tasks eof, should we detect this and bail out early?
;;; - I need a little toolkit for constructing monitors. ;;; - I need a little toolkit for constructing monitors.
;;; - A wrapper that gives a spawned process a tty with the same
;;; options as the current tty.
;;; If I had infinite-pushback ports, I could flush the "task" structure ;;; If I had infinite-pushback ports, I could flush the "task" structure
;;; entirely. This would be better done with a transducer architecture. ;;; entirely. This would be better done with a transducer architecture.
@ -56,7 +58,7 @@
(define (tsend task fmt . args) (define (tsend task fmt . args)
(apply format (task:out task) fmt args)) (apply format (task:out task) fmt args))
(define tsend-line (define tsend/cr
(let ((cr (string-ref "\r" 0))) ; Ugh (let ((cr (string-ref "\r" 0))) ; Ugh
(lambda (task fmt . args) (lambda (task fmt . args)
(let ((p (task:out task))) (let ((p (task:out task)))

View File

@ -1,11 +1,11 @@
(define-structure tty-utils (define-structure tty-utils
(export modify-tty echo-off echo-on raw raw-initialize) (export modify-tty echo-off echo-on raw raw-initialize)
(open scsh let-opt scheme) (open scheme-with-scsh let-opt)
(files tty-utils)) (files tty-utils))
(define-structure expect-syntax-support (define-structure expect-syntax-support
(export expand-expect) (export expand-expect)
(open scheme structure-refs (open scheme structure-refs srfi-1
receiving) ; for making alien containers. receiving) ; for making alien containers.
(access signals) ; for ERROR (access signals) ; for ERROR
(files expect-syntax)) (files expect-syntax))
@ -23,13 +23,15 @@
user-task file->task ports->task close-task user-task file->task ports->task close-task
wait-task close-task wait-task close-task
spawn* (spawn :syntax) spawn* (spawn :syntax)
tsend tsend-line tsend tsend/cr
(expect :syntax) (expect :syntax)
interact* interact/char*
(interact :syntax)) (interact :syntax))
(for-syntax (open expect-syntax-support scheme)) (for-syntax (open expect-syntax-support scheme))
(open scsh formats structure-refs (open scheme-with-scsh formats structure-refs let-opt
receiving srfi-9 scheme srfi-13) receiving srfi-9 srfi-13 srfi-1)
(access signals) ; for ERROR (access signals) ; for ERROR
(files expect interact)) (files expect interact))
@ -41,13 +43,13 @@
(chat :syntax) (chat :syntax)
send send/cr) send send/cr)
(open scsh expect fluids scheme) (open scheme-with-scsh expect fluids)
(files chat)) (files chat))
(define-structure printf-package (define-structure printf-package
(export printf sprintf display/cr display/nl) (export printf sprintf display/cr display/nl)
(open scsh formats scheme) (open scheme-with-scsh formats)
(begin (begin