uwiger/gproc — pull request #34 by jcomellas (2013-01-24 15:49:32+00:00)
Title: Change send/2 so that it returns the pid or pids the message was sent to

To use *gproc* to register names using the *via* mechanism that was
recently added to OTP (`gen_server`, `gen_fsm`, `gen_event`) it must provide a
`send/2` function that can be used to implement the function with the following type spec:
```erlang
send(Name :: term(), Msg :: term()) -> pid().
```
Currently `gproc:send/2` returns the message that was sent. This patch
changes it so that the new type spec for it is:
```erlang
send(Name :: term(), Msg :: term()) -> pid() | [pid()].
```
It will now return the pid or list of pids the message was sent to.

I know this is a backward incompatible change, so I will send another pull request in a few minutes that will add a new function called `send_to_name/2` instead of changing `send/2`.