anchor.diff:                      {stop, {switch_failed, Error}, State}
               end;
           {'P', StdoutData} ->
  -            ok = io:put_chars(StdoutData),
  -            {next_state, StateName, State};
  +            print(StdoutData, StateName, State);
           Request ->
               {stop, {invalid_request, Request}, State}
       catch
  
positive.code:     | {global, GlobalName::term()}
      | {via, Module::atom(), ViaName::term()}.
  
  -export_type([server_instance/0]).
  
  %%
  
negative.code: %%
  
  -spec call(Instance::server_instance(), Module::atom(), Function::atom(),
      Args::list(), Options::call_options()) -> Result::term().
  
  call(Pid, Module, Function, Args, Options) when is_atom(Module)
          andalso is_atom(Function) andalso is_list(Args)
          andalso is_list(Options) ->
      Request = {call, Module, Function, Args, Options},
      call(Pid, Request).
  
  %%
  %% @doc Pass control to remote side by calling the function with arguments
  %%
  
  -spec switch(Instance::server_instance(), Module::atom(), Function::atom(),
          Args::list(), Options::switch_options()) ->
      Result::ok | term().
  
  switch(Pid, Module, Function, Args, Options) when is_atom(Module)
          andalso is_atom(Function) andalso is_list(Args)
  