added waiter-prompt-string parameter (chez compatible)

This commit is contained in:
Abdulaziz Ghuloum 2009-09-25 00:56:09 +03:00
parent 574942c1b0
commit c375d537a3
3 changed files with 12 additions and 4 deletions

View File

@ -38,19 +38,26 @@ description:
Be specific about what the error-port is |#
(library (ikarus cafe)
(export new-cafe)
(export new-cafe waiter-prompt-string)
(import
(only (rnrs) with-exception-handler)
(except (ikarus) new-cafe))
(except (ikarus) new-cafe waiter-prompt-string))
(define eval-depth 0)
(define waiter-prompt-string
(make-parameter ">"
(lambda (x)
(if (string? x)
x
(die 'waiter-prompt-string "not a string" x)))))
(define display-prompt
(lambda (i)
(if (fx= i eval-depth)
(display " " (console-output-port))
(begin
(display ">" (console-output-port))
(display (waiter-prompt-string) (console-output-port))
(display-prompt (fx+ i 1))))))
(define (print-ex ex)

View File

@ -1 +1 @@
1856
1857

View File

@ -389,6 +389,7 @@
[assembler-output i]
[optimizer-output i]
[new-cafe i]
[waiter-prompt-string i]
[expand i]
[core-expand i]
[expand/optimize i]