anchor.diff:      LDSingle (tf_of_fname intf_or_impl.tf_fname)
     | LDInterfaceOfCurrentFile intf ->
       LDInterfaceOfCurrentFile (tf_of_fname intf.tf_fname)
  -  | PushFragment frag -> PushFragment frag
  +  | other -> other
   
   (** Push, run `task`, and pop if it fails.
   
   If `must_rollback` is set, always pop.  Returns a pair: a boolean indicating
   success, and a new REPL state. **)
   let run_repl_transaction st push_kind must_rollback task =
  -  let env = push_repl push_kind task st in
  -  let env, finish_name_tracking = track_name_changes env in // begin name tracking…
  +  let st = push_repl "run_repl_transaction" push_kind task st in
  +  let env, finish_name_tracking = track_name_changes st.repl_env in // begin name tracking…
   
     let check_success () =
       get_err_count () = 0 && not must_rollback in
  
positive.code: //   |> Util.concat_l "\n"
  
  let run_and_rewind st sigint_default task =
    let depth, env' = snapshot st.repl_env "REPL run_and_rewind" in
    let results =
      try Util.with_sigint_handler Util.sigint_raise (fun _ -> Inl <| task st)
      with | Util.SigInt -> Inl sigint_default
           | e -> Inr e in
    let _env'' = rollback env'.solver "REPL run_and_rewind" depth in // CPC FIXME no env''?
    match results with
    | Inl results -> (results, Inl ({ st with repl_env = env' }))
    | Inr e -> raise e // CPC fixme add a test with two computations
  
  let run_with_parsed_and_tc_term st term line column continuation =
  
negative.code: type repl_depth_t = TcEnv.tcenv_depth_t * int
  
  (** Checkpoint the current (typechecking and desugaring) environment **)
  let snapshot_env env msg : repl_depth_t * env_t =
    let ctx_depth, env = TypeChecker.Tc.snapshot_context env msg in
    let opt_depth, () = Options.snapshot () in
    (ctx_depth, opt_depth), env
  
  (** Revert to a previous checkpoint.
  
  Usage note: A proper push/pop pair looks like this:
  
    let noop =
      let env', depth = snapshot_env env in
      // [Do stuff with env']
      let env'' = rollback_env env'.solver depth in
      env''
  
  In most cases, the invariant should hold that ``env'' === env`` (look for
  assertions of the form ``physical_equality _ _`` in the sources).
  
  You may be wondering why we need ``snapshot`` and ``rollback``.  Aren't ``push``
  and ``pop`` sufficient?  They are not.  The issue is that the typechecker's code
  can encounter (fatal) errors at essentially any point, and was not written to
  clean up after itself in these cases.  Fatal errors are handled by raising an
  exception, skipping all code that would ``pop`` previously pushed state.
  
  That's why we need ``rollback``: all that rollback does is call ``pop``
  sufficiently many times to get back into the state we were before the
  corresponding ``pop``. **)
  let rollback_env solver msg (ctx_depth, opt_depth) =
    let env = TypeChecker.Tc.rollback_context solver msg (Some ctx_depth) in
    Options.rollback (Some opt_depth);
    env
  