anchor.diff:  gen_function_specs(ErlTypePrefix, FuncList) ->
       [ gen_function_spec(ErlTypePrefix, X) || X <- FuncList ].
   
  -
   gen_function_spec(ErlTypePrefix, F) ->
  +    gen_spec("-spec", ErlTypePrefix, F).
  +
  +gen_spec(SpecAttribute, ErlTypePrefix, F) ->
       ErlName = F#func.erlang_name,
       Input =
           case F#func.input of
  
positive.code:     Error =
          case F#func.error of
              'undefined' -> "";
              _ -> [ " | {error, ",  ErlTypePrefix, ErlName, "_error()}" ]
          end,
  
      [ "-spec ", ErlName, "/1 :: (", Input, ") -> ", Output, Error, ".\n\n" ].
  
  
  %
  
negative.code:     ],
      Code.
  
  % Generating Piqi-RPC callback specs for: <ErlMod>_rpc.erl
  %
  % Since callbacks are only supported since R15B, will only generate if Erlang
  % version is R15B+
  maybe_gen_rpc_callback_specs(ErlTypePrefix, FuncList) ->
      case can_use_callbacks() of
          true ->
              gen_rpc_callback_specs(ErlTypePrefix, FuncList);
          _ ->
              []
      end.
  
  %% Check if Erlang version is R15+, to determine whether callbacks can be used.
  can_use_callbacks() ->
      case erlang:system_info(otp_release) of
          %% Erlang uses lexicographic ordering, so this works
          [$R, A, B, $B | _] ->
              ([A, B] >= "15");
          _ ->
              false
      end.
  
  gen_rpc_callback_specs(ErlTypePrefix, FuncList) ->
      [gen_callback_spec(ErlTypePrefix, F) || F <- FuncList].
  
  gen_callback_spec(ErlTypePrefix, F) ->
      gen_spec("-callback", ErlTypePrefix, F).
  
  %
  % Generating Piqi-RCP function specs: <ErlMod>_impl.hrl
  