Work toward specifying a repl semantics

It currently relies on the following functions, which need to be written:

val _ = new_constant("lex", ``:string -> token list``);

(* top-level semicolon detector breaks the token list up into chunks.
  the parser turns these chunks into either ast_progs or errors (NONE).
  if it encounters an error, it drops tokens until the next chunk.  *)
val _ = new_constant("parse", ``:token list -> ast_prog option list``);

val _ = new_constant("print_envM", ``:envM -> string``);
val _ = new_constant("print_envC", ``:envC -> string``);
val _ = new_constant("print_envE", ``:envE -> string``);

val _ = new_constant("print_error", ``:error -> string``);

or hooked up to existing functions.