anchor.diff:  
   -record(anres, %% result of analysis
           {
  -          reachable_enums = sets:new()
  +          used_types = sets:new()
           }).
   
   
  
positive.code: is_packed(#field{opts=Opts}) ->
      lists:member(packed, Opts).
  
  index_seq([]) -> [];
  index_seq(L)  -> lists:zip(lists:seq(1,length(L)), L).
  
  
negative.code: %% -- encoders -----------------------------------------------------
  
  analyze_defs(Defs) ->
      UsedTypes = find_used_types(Defs),
      #anres{used_types      = UsedTypes
            }.
  
  find_used_types(Defs) ->
      fold_msg_fields(fun(_MsgName, #field{type=Type}, Acc) ->
                              sets:add_element(Type, Acc)
                      end,
                      sets:new(),
                      Defs).
  
  fold_msg_fields(Fun, InitAcc, Defs) ->
      lists:foldl(fun({{msg, MsgName}, Fields}, Acc) ->
                          lists:foldl(fun(Field, FAcc) ->
                                              Fun(MsgName, Field, FAcc)
                                      end,
                                      Acc,
                                      Fields);
                     (_Def, Acc) ->
                          Acc
                  end,
                  InitAcc,
                  Defs).
  
  %% -- generating code ----------------------------------------------
  