repl: add prompt color
repl: add completion of procedures
repl: add history
repl: more robust control flow handling