anchor.diff:                  replace_term('Fn', Fn),
                   splice_trees('InArgs', InArgs),
                   splice_trees('TrArgs', TrArgs)])
  -     end].
  +     end];
  +format_field_op_translator(ElemPath, verify=Op, {Mod, Fn, ArgTemplate}) ->
  +    FnName = mk_tr_fn_name(ElemPath, Op),
  +    [V,Path] = underscore_unused_args(args_by_op(Op), [1,errorf], ArgTemplate),
  +    ErrorF = ?expr(fun(Reason) ->
  +                           mk_type_error(Reason, 'ActualValue', 'Path')
  +                   end,
  +                   [replace_tree('ActualValue', V),
  +                    replace_tree('Path', Path)]),
  +    TrArgs = [case Term of
  +                  '$1'      -> V;
  +                  '$errorf' -> ErrorF;
  +                  _         -> erl_parse:abstract(Term)
  +              end
  +              || Term <- ArgTemplate],
  +    [inline_attr(FnName,2),
  +     gpb_codegen:format_fn(
  +       FnName,
  +       fun('InArgs') ->
  +               'Mod':'Fn'('TrArgs')
  +       end,
  +       [replace_term('Mod', Mod),
  +        replace_term('Fn', Fn),
  +        splice_trees('InArgs', [V,Path]),
  +        splice_trees('TrArgs', TrArgs)])].
  +
   
   last_tuple_element(Tuple) ->
       element(tuple_size(Tuple), Tuple).
   
   underscore_unused_args(Args, Templ) ->
  -    [case is_arg_used(I, Templ) of
  +    Names = lists:seq(1, length(Args)),
  +    underscore_unused_args(Args, Names, Templ).
  +
  +underscore_unused_args(Args, Names, Templ) ->
  +    [case is_arg_used(Name, Templ) of
            true  -> Arg;
            false -> ?expr(_)
        end
  -     || {I, Arg} <- index_seq(Args)].
  -
  -is_arg_used(I, Templ) ->
  -    lists:member(dollar_i(I), Templ).
  -
  -dollar_i(I) ->
  -    list_to_atom(?ff("$~w", [I])).
  +     || {Name, Arg} <- lists:zip(Names, Args)].
  +
  +is_arg_used(Name, Templ) ->
  +    lists:member(dollar_name(Name), Templ).
  +
  +dollar_name(Name) ->
  +    list_to_atom(?ff("$~w", [Name])).
   
   args_by_op(encode)                   -> [?expr(X)];
   args_by_op(decode)                   -> [?expr(X)];
  
positive.code:                        mk_type_error(invalid_list_of_key_value_tuples, X, Path)
                 end,
                 [replace_term('VerifyKey', KeyVerifierFn),
                  replace_term('VerifyValue', ValueVerifierFn)]);
           maps ->
               gpb_codegen:format_fn(
                 FnName,
  
negative.code:              end
           end
           || {{MsgName, FName}, {KeyType, ValueType}} <- MapInfos])).
  
  compute_any_translations(Defs, Opts) ->
      case proplists:get_value(any_translate,Opts) of
          undefined ->
              dict:new();
          AnyTranslations ->
              compute_any_translations_2(Defs, AnyTranslations)
      end.
  
  compute_any_translations_2(Defs, AnyTranslations) ->
      P3AnyInfos =
          fold_msg_fields_o(
            fun(MsgName, #?gpb_field{name=FName, type={msg,Any}, occurrence=Occ},
                Oneof,
                Acc) when Any == 'google.protobuf.Any'->
                    Path = case {Oneof, Occ} of
                               {false, repeated}  -> [MsgName,FName,[]];
                               {false, _}         -> [MsgName,FName];
                               {{true,CFName}, _} -> [MsgName,CFName,FName]
                           end,
                    [Path | Acc];
               (_MsgName, _Field, _Oneof, Acc) ->
                    Acc
            end,
            [],
            Defs),
      Encode = {encode, fetch_any_translation(encode, AnyTranslations)},
      Decode = {decode, fetch_any_translation(decode, AnyTranslations)},
      Merge  = {merge,  fetch_any_translation(merge,  AnyTranslations)},
      Verify = {verify, fetch_any_translation(verify, AnyTranslations)},
      dict:from_list(
        [{Path, ([Encode,Decode,Verify]
                 ++ [Merge || not is_repeated_elem_path(Path)])}
         || Path <- P3AnyInfos]).
  
  fetch_any_translation(Op, Translations) ->
      case proplists:get_value(Op, Translations) of
          undefined ->
              error({error, {missing_any_translation, {op,Op}, Translations}});
          {M,F,ArgTempl} ->
              {M,F,ArgTempl}
      end.
  
  is_repeated_elem_path([_MsgName,_FName,[]]) -> true;
  is_repeated_elem_path(_) -> false.
  
  %% -- generating code ----------------------------------------------
  
  