anchor.diff:                                    (List.length uvs |> BU.string_of_int)
                                     (Print.term_to_string t), r)));
       let se = Sig_effect_abbrev(lid, uvs, tps, c, tags, flags, r) in
  -    let env = Env.push_sigelt env0 se in
  -    [se], env, []
  +    [se], []
   
     | Sig_declare_typ (_, _, _, quals, _)
     | Sig_let (_, _, _, quals, _)
         when quals |> BU.for_some (function OnlyName -> true | _ -> false) ->
         (* Dummy declaration which must be erased since it has been elaborated somewhere else *)
  -      [], env, []
  +      [], []
   
     | Sig_declare_typ(lid, uvs, t, quals, r) -> //NS: No checks on the qualifiers?
       let env = Env.set_range env r in
  
positive.code:             uvs, SS.close_univ_vars uvs t
      in
      let se = Sig_declare_typ(lid, uvs, t, quals, r) in
      let env = Env.push_sigelt env se in
      [se], env, []
  
    | Sig_assume(lid, phi, quals, r) ->
      let se = tc_assume env lid phi quals r in
      let env = Env.push_sigelt env se in
      [se], env, []
  
    | Sig_main(e, r) ->
      let env = Env.set_range env r in
  
negative.code:           Sig_declare_typ((right lb.lbname).fv_name.v, lb.lbunivs, lb.lbtyp, Assumption::quals, r)), hidden
      else [se], hidden
  
  (* adds the typechecked sigelt to the env, also performs any processing required in the env (such as reset options) *)
  (* this was earlier part of tc_decl, but separating it might help if and when we cache type checked modules *)
  let add_sigelt_to_env (env:Env.env) (se:sigelt) :Env.env =
    match se with
    | Sig_inductive_typ _ -> failwith "add_sigelt_to_env: Impossible, bare data constructor"
    | Sig_datacon _ -> failwith "add_sigelt_to_env: Impossible, bare data constructor"
    | Sig_pragma (p, r) ->
      (match p with
       | ResetOptions _ -> env.solver.refresh (); env
       | _ -> env)
    | Sig_new_effect_for_free _ -> env
    | Sig_new_effect (ne, _) ->
      let env = Env.push_sigelt env se in
      ne.actions |> List.fold_left (fun env a -> Env.push_sigelt env (U.action_as_lb ne.mname a)) env
    | Sig_declare_typ (_, _, _, quals, _)
    | Sig_let (_, _, _, quals, _) when quals |> BU.for_some (function OnlyName -> true | _ -> false) -> env
    | _ -> Env.push_sigelt env se
  
  
  let tc_decls env ses =
    let rec process_one_decl (ses, exports, env, hidden) se =
      if Env.debug env Options.Low
      then BU.print1 ">>>>>>>>>>>>>>Checking top-level decl %s\n" (Print.sigelt_to_string se);
  
      let ses', ses_elaborated = tc_decl env se  in
      let env = ses' |> List.fold_left (fun env se -> add_sigelt_to_env env se) env in
  
      if (Options.log_types()) || Env.debug env <| Options.Other "LogTypes"
      then BU.print1 "Checked: %s\n" (List.fold_left (fun s se -> s ^ Print.sigelt_to_string se ^ "\n") "" ses');
  