anchor.diff:  
   f_dict(Spec) ->
       {?function, dict, 0,
  -     [{?clause, [], [], [?TERM(Spec)]}]}.
  +     [{?clause, [], [], [?TERM([?VERSION | Spec])]}]}.
   
   %%% ------------------------------------------------------------------------
   %%% # gen_hrl/3
  
positive.code: 
  m_enum(Prefix, B, {Name, Values}) ->
      P = Prefix ++ to_upper(Name) ++ "_",
      lists:map(fun({I,A}) ->
                        N = ["'", P, to_upper(z(atom_to_list(A))), "'"],
                        wrap(B,
                             N,
                             ["-define(", N, ", ", integer_to_list(I), ").\n"])
  
negative.code: 
  c_arity(Name, Avp) ->
      {AvpName, Arity} = avp_info(Avp),
      {?clause, [?Atom(Name), ?Atom(AvpName)], [], [?TERM(Arity)]}.
  
  %%% ------------------------------------------------------------------------
  %%% # avp/3
  %%% ------------------------------------------------------------------------
  
  f_avp(Spec) ->
      {?function, avp, 3, avp(Spec) ++ [?BADARG(3)]}.
  
  avp(Spec) ->
      Native     = get_value(avp_types, Spec),
      CustomMods = get_value(custom_types, Spec),
      TypeMods   = get_value(codecs, Spec),
      Imported   = get_value(import_avps, Spec),
      Enums      = get_value(enum, Spec),
  
      Custom = lists:map(fun({M,As}) -> {M, custom_types, As} end,
                         CustomMods)
          ++ lists:map(fun({M,As}) -> {M, codecs, As} end,
                       TypeMods),
      avp(types(Native), Imported, Custom, Enums).
  
  types(Avps) ->
      lists:map(fun({N,_,T,_}) -> {N,T} end, Avps).
  
  avp(Native, Imported, Custom, Enums) ->
      report(native, Native),
      report(imported, Imported),
      report(custom, Custom),
  
      TypeDict = lists:foldl(fun({N,_,T,_}, D) -> orddict:store(N,T,D) end,
                             orddict:from_list(Native),
                             lists:flatmap(fun avps/1, Imported)),
  
      CustomNames = lists:flatmap(fun({_,_,Ns}) -> Ns end, Custom),
  
      lists:map(fun c_base_avp/1,
                lists:filter(fun({N,_}) -> not_in(CustomNames, N) end,
                             Native))
          ++ lists:flatmap(fun(I) -> cs_imported_avp(I, Enums, CustomNames) end,
                           Imported)
          ++ lists:flatmap(fun(C) -> cs_custom_avp(C, TypeDict) end, Custom).
  
  not_in(List, X) ->
      not lists:member(X, List).
  
  c_base_avp({AvpName, T}) ->
      {?clause, [?VAR('T'), ?VAR('Data'), ?Atom(AvpName)],
       [],
       [base_avp(AvpName, T)]}.
  
  base_avp(AvpName, "Enumerated") ->
      ?CALL(enumerated_avp, [?VAR('T'), ?Atom(AvpName), ?VAR('Data')]);
  
  base_avp(AvpName, "Grouped") ->
      ?CALL(grouped_avp, [?VAR('T'), ?Atom(AvpName), ?VAR('Data')]);
  
  base_avp(_, Type) ->
      ?APPLY(diameter_types, ?A(Type), [?VAR('T'), ?VAR('Data')]).
  
  cs_imported_avp({Mod, Avps}, Enums, CustomNames) ->
      lists:map(fun(A) -> imported_avp(Mod, A, Enums) end,
                lists:filter(fun({N,_,_,_}) -> not_in(CustomNames, N) end,
                             Avps)).
  
  imported_avp(_Mod, {AvpName, _, "Grouped" = T, _}, _) ->
      c_base_avp({AvpName, T});
  
  imported_avp(Mod, {AvpName, _, "Enumerated" = T, _}, Enums) ->
      case lists:keymember(AvpName, 1, Enums) of
          true ->
              c_base_avp({AvpName, T});
  