anchor.diff:              _ ->
                   [
   "                {ok, Output} ->\n"
  -"                    piqi_rpc_runtime:encode_output(?MODULE, fun ", ErlMod, ":gen_", ErlName, "_output/1, <<\"", ScopedName, "-output\">>, _OutputFormat, Output, Options)"
  +"                    piqi_rpc_runtime:encode_output(?MODULE, fun ", ErlMod, ":gen_", ErlTypeName, "_output/1, <<\"", ScopedName, "-output\">>, _OutputFormat, Output, Options)"
                   ]
           end,
   
  
positive.code:     gen_spec("-spec", ErlTypePrefix, F).
  
  gen_spec(SpecAttribute, ErlTypePrefix, F) ->
      ErlName = F#func.erlang_name,
      Input =
          case F#func.input of
              'undefined' -> "'undefined'";
              _ -> [ ErlTypePrefix, ErlName, "_input()" ]
          end,
  
      Output =
          case F#func.output of
              'undefined' -> "ok";
              _ -> [ "{ok, ", ErlTypePrefix, ErlName, "_output()}" ]
          end,
  
      Error =
          case F#func.error of
              'undefined' -> "";
              _ -> [ " |\n    {error, ",  ErlTypePrefix, ErlName, "_error()}" ]
          end,
  
      [
  
negative.code:     Output =
          case F#func.output of
              'undefined' -> "ok";
              _ ->
                  % XXX, NOTE: use of piqic:erlname() here is a quick hack but
                  % this should be enough; to do it properly, we'd need to resolve
                  % <Name>-output Piqi type and use its erlang_name
                  [ "{ok, ", ErlMod, ":default_", piqic:erlname(F#func.name), "_output()}" ]
          end,
  
      [ ErlName, "(", Input, ") -> ", Output, ".\n\n" ].
  