anchor.diff:    let rec revert_many env = function
       | [] -> env
       | (task, env') :: entries ->
  +      // Note that we don't roll back additions to repl_names here.  It would be
  +      // nice to do it, but it's a corner case and it's tricky to do cleanly.
         debug "Reverting" task;
         pop env' "run_dep_tasks";
         revert_many env' entries in
  
positive.code:   { prepl_env: env_t;
      prepl_fname: string;
      prepl_stdin: stream_reader;
      prepl_deps: list<completed_dep_task> }
  
  type full_repl_state = { repl_line: int; repl_column: int; repl_fname: string;
  
negative.code:         CTable.register_module_path table (loaded mod_key) mod_path ns_query)
      table (List.rev mods) // List.rev to process files in order or *increasing* precedence
  
  let run_initial_push (st: partial_repl_state) query =
    assert (not query.push_peek_only);
  
    let commit_names st name_events =
      { st with prepl_names = commit_name_tracking None st.prepl_names name_events } in
  
    let on_successful_init (env, name_events) deps repl_deps  =
      TcEnv.toggle_id_info (snd env) true;
  
      let st = commit_names st name_events in
      let full_st =
        { repl_line = 1; repl_column = 0; repl_fname = st.prepl_fname;
          repl_curmod = None; repl_env = env; repl_deps = repl_deps;
          repl_stdin = st.prepl_stdin;
          repl_names = add_module_completions st.prepl_fname deps st.prepl_names } in
  
      wrap_repl_state FullReplState <| run_regular_push full_st query in
  
    let on_failed_init (env, name_events) repl_deps =
      let st = { st with prepl_env = env; prepl_deps = repl_deps } in
      handle_deps_failure (PartialReplState (commit_names st name_events)) in
  
    let env = st.prepl_env in
    let env, finish_name_tracking = track_name_changes env in // begin name tracking…
  
    match load_deps env st.prepl_fname st.prepl_deps with
  