For fun, implemented a 'pmod' parse transform.

See examples/pmod.erl and examples/ex_pmod.erl
This works similarly to OTP's parameterized modules, which they are
now saying that they will drop. Since they drop the compiler support,
a slightly different notation is needed.

-pmod_vars([V1, V2, ...]). % defines the 'global' variables.
-pmod_funs([F1/A1, ...]).  % defines which functions are to be exported.

The functions listed in -pmod_funs/1 are transformed to take an extra
argument, and a new(V1, V2, ...) function is added and exported.

Example:

Eshell V5.9  (abort with ^G)
1> c(ex_pmod).
{ok,ex_pmod}
2> M = ex_pmod:new(a,b).
{ex_pmod,{a,b}}
3> M:b(x,y).
{x,y,a,b}
Tolerate parse_transforming non-top-level forms.

A few changes were made to provide default values for context attributes so that parse_transform:transform/4 could be called for non-top-level forms. I don't know if this is generally useful or if it just fit my weird use case.
Merge pull request #3 from JoeOsborn/permit-non-top-level-forms

Tolerate parse_transforming non-top-level forms.
added LC form to codegen:gen_function/2
improved error reporting, return/2, format_exception/2
Added revert_form/1; deal with revert bugs
codegen:gen_module/3 support
Fix "overlapping domain" Dialyzer warning for '#is_record-'/{1,2}

These contracts will usually not be seen by the user, and are ignored
by Dialyzer because they have overlapping domains, so there is not
much point in using them.  Replace with simpler contracts for now.
Merge pull request #7 from legoscia/is_record_overlapping_contracts

Fix "overlapping domain" Dialyzer warning for '#is_record-'/{1,2}
Fix compilation (dependency wasn't fetched)
Update rebar

The main purpose of this update is to make it work with
erlang.mk and other non-rebar build tools. Rebar now
supports a REBAR_DEPS_DIR environment variable making
this possible.
Merge pull request #8 from essen/fix-compile

Fix compile