anchor.diff:    | FStar.Errors.Err msg when not (Options.trace_error ()) ->
       FStar.TypeChecker.Err.add_errors env [(msg, TcEnv.get_range env)];
       None
  +
  +let check_frag (dsenv, (env:TcEnv.env)) curmod frag =
  +  with_captured_errors env (fun () ->
  +    match tc_one_fragment curmod dsenv env frag with
  +    | Some (m, dsenv, env) ->
  +      Some (m, (dsenv, env), FStar.Errors.get_err_count())
  +    | _ -> None)
   
   (*********************)
   (* Dependency checks *)
  
positive.code:   | None -> Inl ("Unknown option:" ^ opt_name)
    | Some opt -> Inr ("option", alist_of_fstar_option (update_option opt))
  
  let run_module_lookup st symbol =
    let query = Util.split symbol "." in
    match CTable.find_module_or_ns st.repl_names query with
    | None ->
  
negative.code:   | Some (CTable.Namespace ns_info) ->
      Inr ("namespace", CTable.alist_of_ns_info ns_info)
  
  let run_code_lookup (st: full_repl_state) symbol pos_opt requested_info =
    match run_symbol_lookup st symbol pos_opt requested_info with
    | Inr alist -> Inr alist
    | Inl _ -> match run_module_lookup st symbol with
              | Inr alist -> Inr alist
              | Inl err_msg -> Inl "No such symbol, module, or namespace."
  
  let run_lookup' (st: full_repl_state) symbol context pos_opt requested_info =
    match context with
    | LKSymbolOnly -> run_symbol_lookup st symbol pos_opt requested_info
    | LKModule -> run_module_lookup st symbol
    | LKOption -> run_option_lookup symbol
    | LKCode -> run_code_lookup st symbol pos_opt requested_info
  
  let run_lookup (st: full_repl_state) symbol context pos_opt requested_info =
    match run_lookup' st symbol context pos_opt requested_info with
    | Inl err_msg ->
      ((QueryNOK, JsonStr err_msg), Inl st)
  