anchor.diff:            if allow_ghost
             then raise_error (Err.expected_ghost_expression e c msg) e.pos
             else raise_error (Err.expected_pure_expression e c msg) e.pos
  +
  +and tc_tot_or_gtot_term' (env:env) (e:term) (msg:string)
  +: term * lcomp * guard_t
  += tc_tot_or_gtot_term_maybe_solve_deferred env e msg true
   
   and tc_tot_or_gtot_term env e = tc_tot_or_gtot_term' env e ""
   
  
positive.code:       let args, g' = tc_args en p in
        (args::pats, Env.conj_guard g g')) pats ([], Env.trivial_guard)
  
  and tc_tot_or_gtot_term' (env:env) (e:term) (msg:string)
  : term * lcomp * guard_t
  = let e, c, g = tc_maybe_toplevel_term env e in
    if TcComm.is_tot_or_gtot_lcomp c
    then e, c, g
    else let g = Rel.solve_deferred_constraints env g in
         let c, g_c = TcComm.lcomp_comp c in
         let c = norm_c env c in
         let target_comp, allow_ghost =
  
negative.code: 
                  | Tm_uvar _ ->
                    let env = Env.set_expected_typ env t_f in
                    //
                    //AR: 03/03: When typechecking these uvar args,
                    //  we don't want to solve the deferred constraints here,
                    //  since solving them here may mean solving flex-flex equations
                    //  among them
                    //
                    //  Whereas if we wait for unification of these dot pattern uvars
                    //  with the type of the scrutinee (in pat_typ_ok), we have a good
                    //  chance of solving these uvars as flex-rigid equations
                    //
                    //  Therefore, ask tc_tot to not solve deferred, and return the
                    //  guard as is
                    //
                    let a, _, g = tc_tot_or_gtot_term_maybe_solve_deferred
                      env
                      a
                      ""
                      false in  //don't solve the deferred constraints in the guard
                    let subst = NT(f, a)::subst in
                    (a, imp_a), subst, bvs, g
  
  