Parse transform utility for gproc users.
Authors: Ulf Wiger ([email protected]
), Dmitry Demeshchuk ([email protected]
).
This module provides some closer syntactical integration for people who are enthusiastic gproc users.
Specifically, this module transforms Pid ! Msg
into
gproc:send(Pid, Msg)
, which, apart from accepting any type for
Pid
that !
understands, is also able to handle a gproc "triple",
e.g. {n, l, Name}
or even {p, l, Prop}
(in the latter case, the
message may be delivered to multiple recipients).
Users should be aware that parse transforms may be confusing to the casual reader, since they extend the semantics of possibly ubiquitous constructs (as is the case with this transform). Therefore, you should document clearly that this is happening.
Original suggestion by Dimitry Demeschuk.
parse_transform/2 |
parse_transform(Forms, Options) -> any()