anchor.diff:      end
   
   let tc_one_file dsenv env fn = 
  -    let dsenv, fmods = Parser.Driver.parse_file dsenv fn in
  -    let env, all_mods = fmods |> List.fold_left (fun (env, all_mods) m -> 
  -        let ms, env = Tc.Tc.check_module env m in
  +    let dsenv, fmods = Parser.Driver.parse_file dsenv fn in
  +    let env, all_mods = fmods |> List.fold_left (fun (env, all_mods) m -> 
  +        let ms, env = Tc.Tc.check_module env m in
           env, ms@all_mods) (env, []) in
       dsenv, env, List.rev all_mods
   
   let tc_one_fragment curmod dsenv env frag = 
       try
  -        match Parser.Driver.parse_fragment curmod dsenv frag with 
  -            | Inl (dsenv, modul) -> 
  -              let env = match curmod with
  -                | None -> env 
  -                | Some _ ->
  -                  raise (Absyn.Syntax.Err("Interactive mode only supports a single module at the top-level")) in
  -              let modul, npds, env = Tc.Tc.tc_partial_modul env modul in
  -              Some (Some (modul, npds), dsenv, env)
  -
  -            | Inr (dsenv, decls) -> 
  -              begin match curmod with 
  -                | None -> failwith "Fragment without an enclosing module"
  -                | Some (modul,npds) -> 
  -                  let modul, npds', env  = Tc.Tc.tc_more_partial_modul env modul decls in
  -                  Some (Some (modul, npds@npds'), dsenv, env)
  -              end
  +        match Parser.Driver.parse_fragment curmod dsenv frag with 
  +            | Inl (dsenv, modul) -> 
  +              let env = match curmod with
  +                | None -> env 
  +                | Some _ ->
  +                  raise (Absyn.Syntax.Err("Interactive mode only supports a single module at the top-level")) in
  +              let modul, npds, env = Tc.Tc.tc_partial_modul env modul in
  +              Some (Some (modul, npds), dsenv, env)
  +
  +            | Inr (dsenv, decls) -> 
  +              begin match curmod with 
  +                | None -> failwith "Fragment without an enclosing module"
  +                | Some (modul,npds) -> 
  +                  let modul, npds', env  = Tc.Tc.tc_more_partial_modul env modul decls in
  +                  Some (Some (modul, npds@npds'), dsenv, env)
  +              end
       with 
           | Absyn.Syntax.Error(msg, r) -> 
             Tc.Errors.add_errors env [(msg,r)];
  
positive.code: 
  
  let batch_mode_tc filenames = 
      let prims_mod, dsenv, env = tc_prims () in
  
      let all_mods, dsenv, env = filenames |> List.fold_left (fun (all_mods, dsenv, env) f -> 
          Util.reset_gensym();
          let dsenv, env, ms = tc_one_file dsenv env f in
          all_mods@ms, dsenv, env)
          (prims_mod, dsenv, env) in
     
      if !Options.interactive && Tc.Errors.get_err_count () = 0
      then env.solver.refresh()
  
negative.code: let tc_prims () = 
      let solver = if !Options.verify then ToSMT.Encode.solver else ToSMT.Encode.dummy in
      let env = Tc.Env.initial_env solver Const.prims_lid in
      env.solver.init env; 
      
      let p = Options.prims () in
      let dsenv, prims_mod = Parser.Driver.parse_file (Parser.DesugarEnv.empty_env()) p in
      let prims_mod, env = Tc.Tc.check_module env (List.hd prims_mod) in
      prims_mod, dsenv, env
  
  let report_errors nopt = 
      let errs = match nopt with
  