anchor.diff:            t, args
        in
        let t, args = type_of_head true hd args in
  -     let t = N.normalize [Env.UnfoldUntil delta_constant] env t in
  -     let bs, res = U.arrow_formals_comp t in
  -     let res = U.comp_result res in
  -     if List.length bs = List.length args
  -     then let subst = U.subst_of_list bs args in
  -          SS.subst subst res
  -     else level_of_type_fail env e (Print.term_to_string res)
  +     (match apply_well_typed env t args with
  +      | Some t -> t
  +      | None -> level_of_type_fail env e (Print.term_to_string t))
      | Tm_match(_, _, hd::_, _) ->  //AR: TODO: use return annotation?
        let (_, _, hd) = SS.open_branch hd in
        universe_of_aux env hd
  
positive.code:                u
      in aux true t
  
  (* universe_of_aux env e:
        During type-inference, we build terms like WPs for which we need to compute
        explicit universe instantiations.
  
negative.code: 
    | Tm_app(hd, args) ->
      let t_hd = typeof_tot_or_gtot_term_fastpath env hd must_tot in
      bind_opt t_hd (fun t_hd ->
        bind_opt (apply_well_typed env t_hd args) (fun t ->
          if (effect_ok t) ||
             (List.for_all (fun (a, _) -> typeof_tot_or_gtot_term_fastpath env a must_tot |> is_some) args)
          then Some t
  