+ | A.CallExp {func; args; pos} ->
+ (match env_get_val ~sym:func ~env ~pos with
+ | Value.Fun {formals; result} ->
+ List.iter2 formals args ~f:(fun ty_expected exp_given ->
+ check_same {exp=(); ty = ty_expected} (trexp exp_given) ~pos;
+ );
+ return result
+ | Value.Var _ ->
+ E.raise (E.Id_not_a_function {id=func; pos})
+ )