anchor.diff:      let goal = { context = env; witness = u; goal_ty = typ; opts = opts; is_guard = false } in
       ret goal)
   
  +let __tc (e : env) (t : term) : tac<(term * typ * guard_t)> =
  +    bind get (fun ps ->
  +    try ret (ps.main_context.type_of e t) with e -> fail "not typeable")
  +
   let tc (t : term) : tac<typ> =
       bind cur_goal (fun goal ->
  -    bind (try ret (goal.context.type_of goal.context t)
  -          with e -> fail "tc: not typeable") (fun (t, typ, guard) ->
  +    bind (__tc goal.context t) (fun (t, typ, guard) ->
       if not (Rel.is_trivial <| Rel.discharge_guard goal.context guard)
       then fail "tc: got non-trivial guard"
       else ret typ
  
positive.code: 
  let __exact (t:term) : tac<unit> =
      bind cur_goal (fun goal ->
      bind (try ret (goal.context.type_of goal.context t)
            with e -> // printfn "Exception %A" e;
                      fail2 "exact: term is not typeable: %s (%s)" (Print.term_to_string t) (Print.tag_of_term t)) (fun (t, typ, guard) ->
      if not (Rel.is_trivial <| Rel.discharge_guard goal.context guard) then fail "exact: got non-trivial guard" else
      if do_unify goal.context typ goal.goal_ty
      then solve goal t
  
negative.code: 
  let unshelve (t : term) : tac<unit> =
      bind cur_goal (fun goal ->
      bind (__tc goal.context t) (fun (t, typ, guard) ->
      if not (Rel.is_trivial <| Rel.discharge_guard goal.context guard)
      then fail "unshelve: got non-trivial guard"
      else add_goals [{ goal with witness  = bnorm goal.context t;
  