remove newlines from printing semantics, and add case for Rtimeout_error

There's no need to include the newlines since we generate a repl_result
that is delimited by Result constructors.
remove unprotected List.nth from compiler defn