parley repl added by iterrogo on Thu Apr 10 16:55:06 2014

(define (shell-repl)
  (if (exit?)
      #t
      (begin (handle-exceptions
	      exn
	      (begin (print-error-message exn)
		     (display (with-output-to-string (lambda () (print-call-chain)))))
	      (let ((x (with-input-from-string (parley ((repl-prompt))) (lambda () (read)))))
		(write (eval x))
                (line-num (+ (line-num) 1))))
	     (newline)
	     (shell-repl))))

(shell-repl)