anchor.diff:                                            (BU.string_of_int (List.length sub_pats))
                                             (BU.string_of_int (List.length simple_bvs)));
             let simple_pat_e, simple_bvs, g1, erasable =
  +              //
  +              //guard is the typechecking guard
  +              //it contains some deferred constraints for dot pattern uvars
  +              //we will solve them after pat_typ_ok
  +              //
                 let simple_pat_e, simple_pat_t, simple_bvs, guard, erasable =
                     type_of_simple_pat env simple_pat_e
                 in
                 let g' = pat_typ_ok env simple_pat_t (expected_pat_typ env p0.p t) in
  +              //Now solve guard
  +              let guard = Rel.discharge_guard_no_smt env guard in
  +              //And combine with g' (the guard from pat_typ_ok)
                 let guard = Env.conj_guard guard g' in
                 if Env.debug env <| Options.Other "Patterns"
                 then BU.print3 "$$$$$$$$$$$$Checked simple pattern %s at type %s with bvs=%s\n"
  
positive.code: 
                  | Tm_uvar _ ->
                    let env = Env.set_expected_typ env t_f in
                    let a, _, g = tc_tot_or_gtot_term env a in
                    let g = Rel.discharge_guard_no_smt env g in
                    let subst = NT(f, a)::subst in
                    (a, imp_a), subst, bvs, g
  
  
negative.code:           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 ""
  
  