(chibi repl)

A user-friendly REPL with line editing and signal handling. The default REPL provided by chibi-scheme is very minimal, meant primarily to be small and work on any platform. This module provides an advanced REPL that handles vt100 line editing and signal handling, so that C-c will interrupt a computation and bring you back to the REPL prompt. To use this repl, run

chibi-scheme -R

from the command line or within Emacs.Runs an interactive REPL. Repeatedly displays a prompt, then Reads an expression, Evaluates the expression, Prints the result then Loops. Terminates when the end of input is reached or the \exit command is given.

Basic Emacs-style line editing with persistent history completion is provided. C-c can be used to interrupt the current computation and drop back to the prompt. The following keyword arguments customize the REPL:

The module: and environment: keyword arguments should not both be given.

REPL commands in the style of Scheme48 are available to control out-of-band properties. By default a command is written as an identifier beginning with an "@" character, but this can be customized with the escape: keyword. The following commands are available:

The results of the last ten successful evaluations are available via a history facility. $0 holds the most recent result while $9 holds the tenth-most recent result. Evaluations yielding single values are stored as single values while evaluations that yield multiple values are stored as lists of values.

$0

$1

$2

$3

$4

$5

$6

$7

$8

$9

(repl . o)